Bug #:
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:
parent
229f243f5f
commit
c5fc5f197d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue