diff options
Diffstat (limited to 'clang/test/Sema/overloadable.c')
-rw-r--r-- | clang/test/Sema/overloadable.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Sema/overloadable.c b/clang/test/Sema/overloadable.c index 5d39f15ec81..ad021898f2a 100644 --- a/clang/test/Sema/overloadable.c +++ b/clang/test/Sema/overloadable.c @@ -69,3 +69,18 @@ void test() { f0(); f1(); } + +void before_local_1(int) __attribute__((overloadable)); // expected-note {{here}} +void before_local_2(int); // expected-note {{here}} +void before_local_3(int) __attribute__((overloadable)); +void local() { + void before_local_1(char); // expected-error {{must have the 'overloadable' attribute}} + void before_local_2(char) __attribute__((overloadable)); // expected-error {{conflicting types}} + void before_local_3(char) __attribute__((overloadable)); + void after_local_1(char); // expected-note {{here}} + void after_local_2(char) __attribute__((overloadable)); // expected-note {{here}} + void after_local_3(char) __attribute__((overloadable)); +} +void after_local_1(int) __attribute__((overloadable)); // expected-error {{conflicting types}} +void after_local_2(int); // expected-error {{must have the 'overloadable' attribute}} +void after_local_3(int) __attribute__((overloadable)); |