diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-03-05 16:02:06 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-03-05 16:02:06 +0000 |
commit | 12fc4b0624706b474fa10308631fa8daf92f340f (patch) | |
tree | 3264398a860559596d42eb639fbd7285b9c0ca72 /lib/AST/ASTContext.cpp | |
parent | 2bfdad11960ef1d3694d7653f1238191e75e956a (diff) |
Properly handle non-canonical underlying types in
ASTContext::getUnaryTransformType. This can happen if, for example,
an enumeration's underlying type is a typedef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 9424bc3006..5122c21c9a 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2962,7 +2962,7 @@ QualType ASTContext::getUnaryTransformType(QualType BaseType, new (*this, TypeAlignment) UnaryTransformType (BaseType, UnderlyingType, Kind, UnderlyingType->isDependentType() ? - QualType() : UnderlyingType); + QualType() : getCanonicalType(UnderlyingType)); Types.push_back(Ty); return QualType(Ty, 0); } |