[cfe-commits] r39500 - /cfe/cfe/trunk/AST/Type.cpp
bwendlin at cs.uiuc.edu
bwendlin at cs.uiuc.edu
Wed Jul 11 09:45:02 PDT 2007
Author: bwendlin
Date: Wed Jul 11 11:45:01 2007
New Revision: 39500
URL: http://llvm.org/viewvc/llvm-project?rev=39500&view=rev
Log:
Bug #:
Submitted by: Bill Wendling
Reviewed by:
- Can do just a 'cast<>()' because we're checking that it's Tagged.
Modified:
cfe/cfe/trunk/AST/Type.cpp
Modified: cfe/cfe/trunk/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Type.cpp?rev=39500&r1=39499&r2=39500&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/Type.cpp (original)
+++ cfe/cfe/trunk/AST/Type.cpp Wed Jul 11 11:45:01 2007
@@ -46,13 +46,11 @@
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;
}
More information about the cfe-commits
mailing list