[cfe-commits] r132064 - /cfe/trunk/lib/AST/ASTContext.cpp

Douglas Gregor dgregor at apple.com
Wed May 25 10:51:54 PDT 2011


Author: dgregor
Date: Wed May 25 12:51:54 2011
New Revision: 132064

URL: http://llvm.org/viewvc/llvm-project?rev=132064&view=rev
Log:
Properly align UnaryTransformType when allocating it

Modified:
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=132064&r1=132063&r2=132064&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Wed May 25 12:51:54 2011
@@ -2813,9 +2813,10 @@
                                            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);
 }





More information about the cfe-commits mailing list