Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors. This has a number of benefits:
1. Less code.
2. Explicit and implicit constructors get the same diagnostics.
3. The AST explicitly contains constructor calls from implicit default
constructors. This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.
llvm-svn: 86500
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h
index bfef9a3..b21315b 100644
--- a/clang/lib/Sema/Sema.h
+++ b/clang/lib/Sema/Sema.h
@@ -1747,11 +1747,6 @@
const FunctionProtoType *Proto,
Expr **Args, unsigned NumArgs,
SourceLocation RParenLoc);
- void BuildBaseOrMemberInitializers(ASTContext &C,
- CXXConstructorDecl *Constructor,
- CXXBaseOrMemberInitializer **Initializers,
- unsigned NumInitializers
- );
void DeconstructCallFunction(Expr *FnExpr,
NamedDecl *&Function,
@@ -2280,8 +2275,7 @@
void SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor,
CXXBaseOrMemberInitializer **Initializers,
unsigned NumInitializers,
- llvm::SmallVectorImpl<CXXBaseSpecifier *>& Bases,
- llvm::SmallVectorImpl<FieldDecl *>&Members);
+ bool IsImplicitConstructor);
/// computeBaseOrMembersToDestroy - Compute information in current
/// destructor decl's AST of bases and non-static data members which will be