diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-01-24 20:25:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-01-24 20:25:37 +0000 |
commit | 520a89e9d38bb1c9cc2de3f875eae3ac69f9f08a (patch) | |
tree | 54fe8463a6692d6f8706ee98bffde249b43eed0c /lib/AST/DeclBase.cpp | |
parent | ead8c8e4f12a52fe33a395d4dce984c89ab04a77 (diff) |
Notes
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 29ce7ae034b5..2cdcdae9ab02 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -891,12 +891,14 @@ bool Decl::AccessDeclContextSanity() const { // 4. the context is not a record // 5. it's invalid // 6. it's a C++0x static_assert. + // 7. it's a block literal declaration if (isa<TranslationUnitDecl>(this) || isa<TemplateTypeParmDecl>(this) || isa<NonTypeTemplateParmDecl>(this) || !isa<CXXRecordDecl>(getDeclContext()) || isInvalidDecl() || isa<StaticAssertDecl>(this) || + isa<BlockDecl>(this) || // FIXME: a ParmVarDecl can have ClassTemplateSpecialization // as DeclContext (?). isa<ParmVarDecl>(this) || |