diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-08 23:29:05 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-08 23:29:05 +0000 |
commit | 69ff26bd1e7a2faffec0c3b9740cfb0c6bb354c5 (patch) | |
tree | 97f1a41dce220af04ad81eebdba056ec821166c6 /lib/Sema/SemaChecking.cpp | |
parent | 5330ee071743b8a896aa46979b020e6c3ca9b1cc (diff) |
The integer type of an enumeration type isn't always canonical
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index aec90bd9ce..b1a87a83dc 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -2597,7 +2597,7 @@ struct IntRange { if (const ComplexType *CT = dyn_cast<ComplexType>(T)) T = CT->getElementType().getTypePtr(); if (const EnumType *ET = dyn_cast<EnumType>(T)) - T = ET->getDecl()->getIntegerType().getTypePtr(); + T = C.getCanonicalType(ET->getDecl()->getIntegerType()).getTypePtr(); const BuiltinType *BT = cast<BuiltinType>(T); assert(BT->isInteger()); |