Fix for PR3433: map __alignof__ to preferred alignment. (This was
partially done in r65258.)
llvm-svn: 65260
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index e3c4809..103bc37 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -960,7 +960,7 @@
// Get information about the alignment.
unsigned CharSize = Info.Ctx.Target.getCharWidth();
- return Info.Ctx.getTypeAlign(Ty) / CharSize;
+ return Info.Ctx.getPreferredTypeAlign(Ty) / CharSize;
}
unsigned IntExprEvaluator::GetAlignOfExpr(const Expr *E) {