diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-06 23:24:15 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-06-06 23:24:15 +0000 |
commit | dcf17ded66cda437987b5e983f6177cbcc5fa8b6 (patch) | |
tree | 19ae065fc3d3973cbf75801b74d6e59405809349 /clang/lib/AST/DeclBase.cpp | |
parent | 0629e1252ff62948ca2085653c2f24f76ec30ab8 (diff) | |
download | bcm5719-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.cpp | 1 |
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) || |