]> granicus.if.org Git - clang/commitdiff
Properly align UnaryTransformType when allocating it
authorDouglas Gregor <dgregor@apple.com>
Wed, 25 May 2011 17:51:54 +0000 (17:51 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 25 May 2011 17:51:54 +0000 (17:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132064 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index f356c908e9301e9488d46d68fd779ae0460da9ac..d5003be5dea2b21467fcb05bf3928f317eeb5063 100644 (file)
@@ -2813,9 +2813,10 @@ QualType ASTContext::getUnaryTransformType(QualType BaseType,
                                            UnaryTransformType::UTTKind Kind)
     const {
   UnaryTransformType *Ty =
-    new UnaryTransformType (BaseType, UnderlyingType, Kind,
-                            UnderlyingType->isDependentType() ?
-                              QualType() : UnderlyingType);
+    new (*this, TypeAlignment) UnaryTransformType (BaseType, UnderlyingType, 
+                                                   Kind,
+                                 UnderlyingType->isDependentType() ?
+                                    QualType() : UnderlyingType);
   Types.push_back(Ty);
   return QualType(Ty, 0);
 }