[cfe-commits] r84141 - /cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp

Douglas Gregor dgregor at apple.com
Wed Oct 14 14:33:19 PDT 2009


Author: dgregor
Date: Wed Oct 14 16:33:19 2009
New Revision: 84141

URL: http://llvm.org/viewvc/llvm-project?rev=84141&view=rev
Log:
Check the implicit instantiation of a static data member of a class
template that has no out-of-line definition.

Modified:
    cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp

Modified: cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp?rev=84141&r1=84140&r2=84141&view=diff

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp Wed Oct 14 16:33:19 2009
@@ -19,8 +19,11 @@
 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;
+}





More information about the cfe-commits mailing list