diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-17 23:29:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-17 23:29:11 +0000 |
commit | 30ab37122300a5f6664b8ae2d0b43b4396eb6bcb (patch) | |
tree | dc1624fec18cd12c6e991b6e679264354da13e06 /lib/Sema/SemaStmt.cpp | |
parent | 0b3b4363df8d24905cef8254b0841ef1c9a8bfac (diff) |
For -Wswitch-enum warnings, be sure to look through typedefs of enum
types. Fixes <rdar://problem/7643909>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index fa42634a34..d9f5b38eb9 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -752,7 +752,7 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtArg Switch, // Check to see if switch is over an Enum and handles all of its // values - const EnumType* ET = dyn_cast<EnumType>(CondTypeBeforePromotion); + const EnumType* ET = CondTypeBeforePromotion->getAs<EnumType>(); // If switch has default case, then ignore it. if (!CaseListIsErroneous && !TheDefaultStmt && ET) { const EnumDecl *ED = ET->getDecl(); |