Lines Matching full:example
7 void fn1a() __attribute__((example)) {
8 __attribute__((example)) for (int i = 0; i < 9; ++i) {}
10 [[example]] void fn1b() {
11 [[example]] for (int i = 0; i < 9; ++i) {}
13 [[plugin::example]] void fn1c() {
14 [[plugin::example]] for (int i = 0; i < 9; ++i) {}
16 void fn2() __attribute__((example("somestring", 1, 2.0))) {
17 __attribute__((example("abc", 3, 4.0))) for (int i = 0; i < 9; ++i) {}
19 template <int N> void template_fn() __attribute__((example("template", N))) {
20 __attribute__((example("def", N + 1))) for (int i = 0; i < 9; ++i) {}
24 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<col:[0-9]+(, col:[0-9]+)?>}} "example"
25 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<line:[0-9]+:[0-9]+(, col:[0-9]+)?>}} "example"
27 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<col:[0-9]+(, col:[0-9]+)?>}} "example"
28 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<line:[0-9]+:[0-9]+(, col:[0-9]+)?>}} "example"
30 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<col:[0-9]+(, col:[0-9]+)?>}} "example"
31 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<line:[0-9]+:[0-9]+(, col:[0-9]+)?>}} "example"
33 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<col:[0-9]+(, col:[0-9]+)?>}} "example"
37 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<line:[0-9]+:[0-9]+(, col:[0-9]+)?>}} "example"
41 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<col:[0-9]+(, col:[0-9]+)?>}} Implicit "example"
46 // CHECK: -AnnotateAttr 0x{{[0-9a-z]+}} {{<line:[0-9]+:[0-9]+(, col:[0-9]+)?>}} "example"
51 int var1 __attribute__((example("otherstring"))) = 1; // expected-warning {{'example' attribute only applies to functions}}
52 class Example {
53 void __attribute__((example)) fn3(); // expected-error {{'example' attribute only allowed at file scope}}
55 void fn4() __attribute__((example(123))) { // expected-error {{first argument to the 'example' attribute must be a string literal}}
56 __attribute__((example("somestring"))) while (true); // expected-warning {{'example' attribute only applies to for loop statements}}
58 void fn5() __attribute__((example("a","b", 3, 4.0))) { // expected-error {{'example' attribute only accepts at most three arguments}}
59 __attribute__((example("a","b", 3, 4.0))) for (int i = 0; i < 10; ++i) {} // expected-error {{'example' attribute only accepts at most three arguments}}