summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-06-06 23:24:15 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-06-06 23:24:15 +0000
commitdcf17ded66cda437987b5e983f6177cbcc5fa8b6 (patch)
tree19ae065fc3d3973cbf75801b74d6e59405809349 /clang/lib/AST/DeclBase.cpp
parent0629e1252ff62948ca2085653c2f24f76ec30ab8 (diff)
downloadbcm5719-llvm-dcf17ded66cda437987b5e983f6177cbcc5fa8b6.tar.gz
bcm5719-llvm-dcf17ded66cda437987b5e983f6177cbcc5fa8b6.zip
Convert MemberExpr creation and serialization to work the same way as
most / all other Expr subclasses. This reinstates r362551, reverted in r362597, with a fix to a bug that caused MemberExprs to sometimes have a null FoundDecl after a round-trip through an AST file. llvm-svn: 362756
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 31985486d1d..f5853b49804 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -920,6 +920,7 @@ bool Decl::AccessDeclContextSanity() const {
if (isa<TranslationUnitDecl>(this) ||
isa<TemplateTypeParmDecl>(this) ||
isa<NonTypeTemplateParmDecl>(this) ||
+ !getDeclContext() ||
!isa<CXXRecordDecl>(getDeclContext()) ||
isInvalidDecl() ||
isa<StaticAssertDecl>(this) ||
OpenPOWER on IntegriCloud