From 69d9775da47a4b9f165dbc33277f02982928a94e Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 25 May 2011 17:51:54 +0000 Subject: [PATCH] Properly align UnaryTransformType when allocating it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132064 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTContext.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } -- 2.40.0