summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-02-14 01:47:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-02-14 01:47:04 +0000
commit5bda63f16bd4cc418319d760d1d7274f8c5101e3 (patch)
tree63d58ef1a32b40ffb32ebe49fc731fa6ad57e1ab /clang/test
parent7f999078bf24bf1c66fb6b66638856bd5e1b3e15 (diff)
downloadbcm5719-llvm-5bda63f16bd4cc418319d760d1d7274f8c5101e3.tar.gz
bcm5719-llvm-5bda63f16bd4cc418319d760d1d7274f8c5101e3.zip
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. llvm-svn: 175119
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaCXX/linkage2.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/linkage2.cpp b/clang/test/SemaCXX/linkage2.cpp
index d1d8d3a1560..2cee581b49c 100644
--- a/clang/test/SemaCXX/linkage2.cpp
+++ b/clang/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);
+ }
+}
OpenPOWER on IntegriCloud