diff options
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 1f6630e3436..1b4710e3d08 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -1433,7 +1433,11 @@ Sema::SetBaseOrMemberInitializers(CXXConstructorDecl *Constructor,                                    bool AnyErrors) {    // We need to build the initializer AST according to order of construction    // and not what user specified in the Initializers list. -  CXXRecordDecl *ClassDecl = cast<CXXRecordDecl>(Constructor->getDeclContext()); +  CXXRecordDecl *ClassDecl +    = cast<CXXRecordDecl>(Constructor->getDeclContext())->getDefinition(); +  if (!ClassDecl) +    return true; +      llvm::SmallVector<CXXBaseOrMemberInitializer*, 32> AllToInit;    llvm::DenseMap<const void *, CXXBaseOrMemberInitializer*> AllBaseFields;    bool HasDependentBaseInit = false; | 

