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 222adcb..47b7e7e 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -436,7 +436,8 @@
   //    FunctionDecl)
   // 4. the context is not a record
   if (isa<TranslationUnitDecl>(this) ||
-      !isa<CXXRecordDecl>(getDeclContext()))
+      !isa<CXXRecordDecl>(getDeclContext()) ||
+      isInvalidDecl())
     return;
 
   assert(Access != AS_none &&