summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-01-14 00:33:10 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-01-14 00:33:10 +0000
commit9a15afeadc73e4cd1ea1c0fed3fbcd94b3bc3133 (patch)
tree14033bc832813be148b7f577acdae18c20953030 /lib/Sema/SemaExpr.cpp
parent3806cf84dce82865ff786f837280441bdb59ead0 (diff)
Look through sugar when determining whether a type is a scoped enumeration
type. Patch by Stephan Bergmann! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 59efbc1bb6..fba7a2d23f 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/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;
}