Skip to content
Snippets Groups Projects
Commit 5083e262 authored by Fariborz Jahanian's avatar Fariborz Jahanian
Browse files

After a conversation with Doug. I added a fix me to

where we build the constructor's initializer list.

llvm-svn: 80735
parent efe96918
No related branches found
No related tags found
No related merge requests found
...@@ -609,6 +609,19 @@ CXXConstructorDecl::setBaseOrMemberInitializers( ...@@ -609,6 +609,19 @@ CXXConstructorDecl::setBaseOrMemberInitializers(
} }
if (HasDependentBaseInit) { 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 // If we have a dependent base initialization, we can't determine the
// association between initializers and bases; just dump the known // association between initializers and bases; just dump the known
// initializers into the list, and don't try to deal with other bases. // initializers into the list, and don't try to deal with other bases.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment