sizeof() return size in bytes, not bits, patch by Nuno Lopes!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44316 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index fa1a3c9..7722139 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -589,7 +589,7 @@
// Get information about the size or align.
if (Exp->getOpcode() == UnaryOperator::SizeOf)
Result = Ctx.getTypeSize(Exp->getSubExpr()->getType(),
- Exp->getOperatorLoc());
+ Exp->getOperatorLoc()) / 8;
else
Result = Ctx.getTypeAlign(Exp->getSubExpr()->getType(),
Exp->getOperatorLoc());