[cfe-dev] Type::isIncompleteType()...
Steve Naroff
snaroff at apple.com
Sun Feb 10 18:35:10 PST 2008
Folks,
Do you think it makes sense for Type::isIncompleteType() to return
true when the Tag definition is invalid?
For example...
case Tagged:
// A tagged type (struct/union/enum/class) is incomplete if the
decl is a
// forward declaration, but not a full definition (C99 6.2.5p22).
- return !cast<TagType>(CanonicalType)->getDecl()->isDefinition();
+ TagDecl *TD = cast<TagType>(CanonicalType)->getDecl();
+ return !TD->isDefinition() || TD->isInvalidDecl();
Since this predicate is fairly low-level, I wanted to get some
feedback...
snaroff
More information about the cfe-dev
mailing list