summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-05-25 17:51:54 +0000
committerDouglas Gregor <dgregor@apple.com>2011-05-25 17:51:54 +0000
commit6c6e6761b23716ea7bfdac03b6799ace835ee35c (patch)
treec3375a473ae29680d7b75775c8a9a9c326cb1403
parent46662e0f91dcc2fe27a4a5dc06d47b59663632b6 (diff)
downloadbcm5719-llvm-6c6e6761b23716ea7bfdac03b6799ace835ee35c.tar.gz
bcm5719-llvm-6c6e6761b23716ea7bfdac03b6799ace835ee35c.zip
Properly align UnaryTransformType when allocating it
llvm-svn: 132064
-rw-r--r--clang/lib/AST/ASTContext.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index f356c908e93..d5003be5dea 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud