summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-07-17 04:21:51 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-07-17 04:21:51 +0000
commit64fc0727ffe36ee582af1e70913db49fdf67a3dc (patch)
tree41e8a01eda27d74892820278bec58b35d145b98b /clang/test/Sema
parentc5cd187ee3c0ae5e8b67011d10ca34ec2aae6184 (diff)
downloadbcm5719-llvm-64fc0727ffe36ee582af1e70913db49fdf67a3dc.tar.gz
bcm5719-llvm-64fc0727ffe36ee582af1e70913db49fdf67a3dc.zip
Tests for "Disabling of "redefine_extname" pragma for C++ code"
In response to Richard Smith's comment (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150622/131782.html), this patch disables "redefine_extname" pragma for C++ code. Also, I added a test that this pragma doesn't apply to static declarations. Differential Revision: http://reviews.llvm.org/D10805 llvm-svn: 242507
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/redefine_extname.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/redefine_extname.c b/clang/test/Sema/redefine_extname.c
new file mode 100644
index 00000000000..8202176c9f7
--- /dev/null
+++ b/clang/test/Sema/redefine_extname.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux -Wpragmas -verify %s
+
+// Check that pragma redefine_extname applies to external declarations only.
+#pragma redefine_extname foo_static bar_static
+static int foo_static() { return 1; } // expected-warning {{#pragma redefine_extname is applicable to external C declarations only; not applied to function 'foo_static'}}
+
OpenPOWER on IntegriCloud