summaryrefslogtreecommitdiff
path: root/test/SemaCXX/linkage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/linkage.cpp')
-rw-r--r--test/SemaCXX/linkage.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaCXX/linkage.cpp b/test/SemaCXX/linkage.cpp
index 13d295a5d59b..8a2013fd52b4 100644
--- a/test/SemaCXX/linkage.cpp
+++ b/test/SemaCXX/linkage.cpp
@@ -5,6 +5,8 @@
// RUN: %clang_cc1 -Werror -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
+// CHECK: @_ZZN5test61A3fooEvE3bar = linkonce_odr global i32 0, align 4
+
// PR8926
namespace test0 {
typedef struct {
@@ -103,3 +105,20 @@ namespace test5 {
};
}
}
+
+// Test that we don't compute linkage too hastily before we're done
+// processing a record decl. rdar://15928125
+namespace test6 {
+ typedef struct {
+ int foo() {
+ // Tested at top of file.
+ static int bar = 0;
+ return bar++;
+ }
+ } A;
+
+ void test() {
+ A a;
+ a.foo();
+ }
+}