Allow us to ask for the access specifier of a translation unit

llvm-svn: 68548
This commit is contained in:
Douglas Gregor 2009-04-07 20:58:25 +00:00
parent ca93aabeba
commit ceec5cbaed
1 changed files with 2 additions and 1 deletions

View File

@ -338,7 +338,8 @@ DeclContext *Decl::castToDeclContext(const Decl *D) {
#ifndef NDEBUG
void Decl::CheckAccessDeclContext() const {
assert((Access != AS_none || !isa<CXXRecordDecl>(getDeclContext())) &&
assert((Access != AS_none || isa<TranslationUnitDecl>(this) ||
!isa<CXXRecordDecl>(getDeclContext())) &&
"Access specifier is AS_none inside a record decl");
}