diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-02-14 01:47:04 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-02-14 01:47:04 +0000 |
commit | d2fdd4256a2efc41365ccdd27a210d1d99a1fe3a (patch) | |
tree | 806a23fc44c70cd99e6316463c8e25362d3abdbd /test | |
parent | 950fee2555f7a6bd193e588d6b6a941fd182391a (diff) |
merge hasCLanguageLinkage and isExternC. Keep the shorter name.
I added hasCLanguageLinkage while fixing some language linkage bugs some
time ago so that I wouldn't have to check all users of isExternC. It turned
out to be a much longer detour than expected, but this patch finally
merges the two again. The isExternC function now implements just the
standard notion of having C language linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/SemaCXX/linkage2.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaCXX/linkage2.cpp b/test/SemaCXX/linkage2.cpp index d1d8d3a156..2cee581b49 100644 --- a/test/SemaCXX/linkage2.cpp +++ b/test/SemaCXX/linkage2.cpp @@ -106,3 +106,22 @@ extern "C" { extern "C++" { extern void test8_g(); } + +extern "C" { + void __attribute__((overloadable)) test9_f(int c); // expected-note {{previous declaration is here}} +} +extern "C++" { + void __attribute__((overloadable)) test9_f(int c); // expected-error {{declaration of 'test9_f' has a different language linkage}} +} + +extern "C" { + void __attribute__((overloadable)) test10_f(int); + void __attribute__((overloadable)) test10_f(double); +} + +extern "C" { + void test11_f() { + void __attribute__((overloadable)) test11_g(int); + void __attribute__((overloadable)) test11_g(double); + } +} |