diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-14 00:33:10 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-14 00:33:10 +0000 |
commit | 43d3f55072759739cbee96647c5732bd16cab854 (patch) | |
tree | a3b57d03826eee6bfa7576c1d9b73cf80d05b481 /clang/lib/Sema/SemaExpr.cpp | |
parent | a3b04cea0458481ccdd29573e52931ad70fd3a63 (diff) | |
download | bcm5719-llvm-43d3f55072759739cbee96647c5732bd16cab854.tar.gz bcm5719-llvm-43d3f55072759739cbee96647c5732bd16cab854.zip |
Look through sugar when determining whether a type is a scoped enumeration
type. Patch by Stephan Bergmann!
llvm-svn: 225889
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 59efbc1bb6a..fba7a2d23ff 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -7546,7 +7546,7 @@ QualType Sema::CheckSubtractionOperands(ExprResult &LHS, ExprResult &RHS, } static bool isScopedEnumerationType(QualType T) { - if (const EnumType *ET = dyn_cast<EnumType>(T)) + if (const EnumType *ET = T->getAs<EnumType>()) return ET->getDecl()->isScoped(); return false; } |