aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-22 17:53:38 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-22 17:53:38 +0000
commitfdd8ab11bc40c7f206c8f1e892faa002cc6536b1 (patch)
tree8e7eed05c27e8cc2435e12ef6d37d7689b610439 /lib/AST/DeclBase.cpp
parent325bf177ac0f1db7888e2d7b194515466ba91762 (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.cpp3
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 &&