summaryrefslogtreecommitdiffstats
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
commit2b76dd9a9e6bc0dca7ce812b6bc615294c1237e1 (patch)
tree8c34692a59e1060af2a22fbb181a3dd1b06f8702
parentdd4831794b928e9affb1290eea8c895203d672ee (diff)
downloadbcm5719-llvm-2b76dd9a9e6bc0dca7ce812b6bc615294c1237e1.tar.gz
bcm5719-llvm-2b76dd9a9e6bc0dca7ce812b6bc615294c1237e1.zip
Don't assert that we have a valid access specifier on an invalid
declaration. This is the trivial part of PR6365. llvm-svn: 96792
-rw-r--r--clang/lib/AST/DeclBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 222adcb28e4..47b7e7efb60 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/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 &&
OpenPOWER on IntegriCloud