diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-01 23:08:16 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-09-01 23:08:16 +0000 |
commit | 5083e2623bb99c533d1c80553be374a8a1fa137f (patch) | |
tree | 85e4b631c81aa2c7ac4dad76ff7509ac2f1d6494 /clang/lib/AST/DeclCXX.cpp | |
parent | efe96918f858f53088e17ac3690518cb8306690a (diff) | |
download | bcm5719-llvm-5083e2623bb99c533d1c80553be374a8a1fa137f.tar.gz bcm5719-llvm-5083e2623bb99c533d1c80553be374a8a1fa137f.zip |
After a conversation with Doug. I added a fix me to
where we build the constructor's initializer list.
llvm-svn: 80735
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index adcd3f9aa92..96423104065 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -609,6 +609,19 @@ CXXConstructorDecl::setBaseOrMemberInitializers( } 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. |