summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/redefine_extname.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-07-05 14:23:59 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-07-05 14:23:59 +0000
commitc192b3dcffd5e672a2b2e1730e2440febb4fb192 (patch)
treeac719b5984165053bf83d71142e4d96b609b9784 /test/CodeGenCXX/redefine_extname.cpp
parent2e645aa5697838f16ec570eb07c2bee7e13d0e0b (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/redefine_extname.cpp')
-rw-r--r--test/CodeGenCXX/redefine_extname.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/CodeGenCXX/redefine_extname.cpp b/test/CodeGenCXX/redefine_extname.cpp
index 2b6b703a1b8f..f76fe6252fef 100644
--- a/test/CodeGenCXX/redefine_extname.cpp
+++ b/test/CodeGenCXX/redefine_extname.cpp
@@ -8,7 +8,7 @@ extern "C" {
int statvfs64(struct statvfs64 *);
}
-void foo() {
+void some_func() {
struct statvfs64 st;
statvfs64(&st);
// Check that even if there is a structure with redefined name before the
@@ -16,3 +16,15 @@ void foo() {
// CHECK: call i32 @statvfs(%struct.statvfs64* %st)
}
+// This is a case when redefenition is deferred *and* we have a local of the
+// same name. PR23923.
+#pragma redefine_extname foo bar
+int f() {
+ int foo = 0;
+ return foo;
+}
+extern "C" {
+ int foo() { return 1; }
+// CHECK: define i32 @bar()
+}
+