diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-09-08 21:32:35 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-09-08 21:32:35 +0000 |
commit | 65b63ec1410f09e1f3cdb847018d678b8f8fc3f7 (patch) | |
tree | 466519423835379928fcb15933b79f35e928e381 /lib/AST/DeclBase.cpp | |
parent | b7566d8346ed8040a5cb7cefe96bd6ccbf015595 (diff) |
Re-enable CheckAccessDeclContext and make sure it doesn't trigger assertions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 0b958fe82b..7525b34d88 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -418,18 +418,20 @@ SourceLocation Decl::getBodyRBrace() const { #ifndef NDEBUG void Decl::CheckAccessDeclContext() const { - // FIXME: Disable this until rdar://8146294 "access specifier for inner class - // templates is not set or checked" is fixed. - return; // Suppress this check if any of the following hold: // 1. this is the translation unit (and thus has no parent) // 2. this is a template parameter (and thus doesn't belong to its context) // 3. the context is not a record // 4. it's invalid + // 5. it's a C++0x static_assert. if (isa<TranslationUnitDecl>(this) || isa<TemplateTypeParmDecl>(this) || !isa<CXXRecordDecl>(getDeclContext()) || - isInvalidDecl()) + isInvalidDecl() || + isa<StaticAssertDecl>(this) || + // FIXME: a ParmVarDecl can have ClassTemplateSpecialization + // as DeclContext (?). + isa<ParmVarDecl>(this)) return; assert(Access != AS_none && |