summaryrefslogtreecommitdiffstats
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
commitb81005dffc0107908571e6ae8ef8a05034ea687a (patch)
treeefb6d3d1e6788bcb8a6c474e629f4f7a89a5d926
parent3cc3cdeea96c6a3c024e3c47daad2853e8017d6e (diff)
downloadbcm5719-llvm-b81005dffc0107908571e6ae8ef8a05034ea687a.tar.gz
bcm5719-llvm-b81005dffc0107908571e6ae8ef8a05034ea687a.zip
Check the implicit instantiation of a static data member of a class
template that has no out-of-line definition. llvm-svn: 84141
-rw-r--r--clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp b/clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
index f2282a23951..3938509961b 100644
--- a/clang/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
+++ b/clang/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;
+}
OpenPOWER on IntegriCloud