aboutsummaryrefslogtreecommitdiff
path: root/test/CXX
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-14 21:33:19 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-14 21:33:19 +0000
commit9ada570e77bdd8334a86528b07e5569d00750b3c (patch)
tree2413e3c19ff3b2f66d3f3a166d11e901e7a8d3c1 /test/CXX
parent1028c9f0afc1cc5f4951b39b7067fa57c1fea07b (diff)
Check the implicit instantiation of a static data member of a class
template that has no out-of-line definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84141 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX')
-rw-r--r--test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp b/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
index f2282a2395..3938509961 100644
--- a/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
+++ b/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
@@ -19,8 +19,11 @@ template int X<int>::member1;
template int X<int>::member2;
// For implicit instantiation of
-long& get(bool Cond) {
+long& get(bool Cond1, bool Cond2) {
// CHECK: @_ZN1XIlE7member1E = weak global i64 0
// CHECK: @_ZN1XIlE7member2E = weak global i64 17
- return Cond? X<long>::member1 : X<long>::member2;
-} \ No newline at end of file
+ // CHECK: @_ZN1XIlE7member3E = external global i64
+ return Cond1? X<long>::member1
+ : Cond2? X<long>::member2
+ : X<long>::member3;
+}