From: Douglas Gregor Date: Wed, 25 May 2011 17:51:54 +0000 (+0000) Subject: Properly align UnaryTransformType when allocating it X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69d9775da47a4b9f165dbc33277f02982928a94e;p=clang Properly align UnaryTransformType when allocating it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132064 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index f356c908e9..d5003be5de 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -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); }