constexpr: Disable checking of constructor member initializer lists for
constexpr constructor templates. Such checking is optional, and currently hard
to get right since clang doesn't generate implicit member initializers until
instantiation (even for non-dependent members).

This is needed for clang to accept libstdc++ from g++4.6 in c++0x mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141547 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 247d8dc..4f9c049 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -902,7 +902,8 @@
         Diag(Dcl->getLocation(), diag::err_constexpr_union_ctor_no_init);
         return false;
       }
-    } else if (!Constructor->isDelegatingConstructor()) {
+    } else if (!Constructor->isDependentContext() &&
+               !Constructor->isDelegatingConstructor()) {
       assert(RD->getNumVBases() == 0 && "constexpr ctor with virtual bases");
 
       // Skip detailed checking if we have enough initializers, and we would