[cfe-commits] r80735 - /cfe/trunk/lib/AST/DeclCXX.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Sep 1 16:08:17 PDT 2009


Author: fjahanian
Date: Tue Sep  1 18:08:16 2009
New Revision: 80735

URL: http://llvm.org/viewvc/llvm-project?rev=80735&view=rev
Log:
After a conversation with Doug. I added a fix me to
where we build the constructor's initializer list.


Modified:
    cfe/trunk/lib/AST/DeclCXX.cpp

Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=80735&r1=80734&r2=80735&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Tue Sep  1 18:08:16 2009
@@ -609,6 +609,19 @@
   }
 
   if (HasDependentBaseInit) {
+    // FIXME. This does not preserve the ordering of the initializers.
+    // Try (with -Wreorder)
+    // template<class X> struct A {};
+    // template<class X> struct B : A<X> { 
+    //   B() : x1(10), A<X>() {} 
+    //   int x1;
+    // };
+    // B<int> x;
+    // On seeing one dependent type, we should essentially exit this routine
+    // while preserving user-declared initializer list. When this routine is
+    // called during instantiatiation process, this routine will rebuild the
+    // oderdered initializer list correctly.
+    
     // If we have a dependent base initialization, we can't determine the
     // association between initializers and bases; just dump the known
     // initializers into the list, and don't try to deal with other bases.





More information about the cfe-commits mailing list