diff options
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 222adcb28e..47b7e7efb6 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -436,7 +436,8 @@ void Decl::CheckAccessDeclContext() const { // FunctionDecl) // 4. the context is not a record if (isa<TranslationUnitDecl>(this) || - !isa<CXXRecordDecl>(getDeclContext())) + !isa<CXXRecordDecl>(getDeclContext()) || + isInvalidDecl()) return; assert(Access != AS_none && |