diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-22 17:53:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-22 17:53:38 +0000 |
commit | fdd8ab11bc40c7f206c8f1e892faa002cc6536b1 (patch) | |
tree | 8e7eed05c27e8cc2435e12ef6d37d7689b610439 /lib/AST/DeclBase.cpp | |
parent | 325bf177ac0f1db7888e2d7b194515466ba91762 (diff) |
Don't assert that we have a valid access specifier on an invalid
declaration. This is the trivial part of PR6365.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96792 91177308-0d34-0410-b5e6-96231b3b80d8
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 && |