Assert that tag decls are never marked (in)valid after definition is complete
Sema relies on this assumption. Follow-up to r197848. llvm-svn: 197850
This commit is contained in:
parent
0732beb21f
commit
a5d645976f
|
@ -85,6 +85,7 @@ const char *Decl::getDeclKindName() const {
|
|||
|
||||
void Decl::setInvalidDecl(bool Invalid) {
|
||||
InvalidDecl = Invalid;
|
||||
assert(!isa<TagDecl>(this) || !cast<TagDecl>(this)->isCompleteDefinition());
|
||||
if (Invalid && !isa<ParmVarDecl>(this)) {
|
||||
// Defensive maneuver for ill-formed code: we're likely not to make it to
|
||||
// a point where we set the access specifier, so default it to "public"
|
||||
|
|
Loading…
Reference in New Issue