From: Douglas Gregor Date: Mon, 22 Feb 2010 17:53:38 +0000 (+0000) Subject: Don't assert that we have a valid access specifier on an invalid X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fdd8ab11bc40c7f206c8f1e892faa002cc6536b1;p=clang 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 --- 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(this) || - !isa(getDeclContext())) + !isa(getDeclContext()) || + isInvalidDecl()) return; assert(Access != AS_none &&