Submitted by: Bill Wendling
Reviewed by:

- Can do just a 'cast<>()' because we're checking that it's Tagged.

llvm-svn: 39500
This commit is contained in:
Bill Wendling 2007-05-27 23:36:18 +00:00
parent 229f243f5f
commit c5fc5f197d
1 changed files with 5 additions and 7 deletions

View File

@ -46,13 +46,11 @@ bool Type::isDerivedType() const {
case FunctionNoProto:
case Reference:
return true;
case Tagged:
if (const TagType *TT = dyn_cast<TagType>(CanonicalType)) {
const Decl::Kind Kind = TT->getDecl()->getKind();
if (Kind == Decl::Struct || Kind == Decl::Union)
return true;
}
// Fall through
case Tagged: {
const TagType *TT = cast<TagType>(CanonicalType);
const Decl::Kind Kind = TT->getDecl()->getKind();
return Kind == Decl::Struct || Kind == Decl::Union;
}
default:
return false;
}