diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-11-25 17:48:21 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-11-25 17:48:21 +0000 |
| commit | 852ed06d60b94b2ab302b238028dcd5ddf22fe1b (patch) | |
| tree | 8056bdf84caf72a12fe242b55f21a04e4c53c91a | |
| parent | 185eeac0f8ebc3ea9cf34068aab18b035625b2c0 (diff) | |
| download | bcm5719-llvm-852ed06d60b94b2ab302b238028dcd5ddf22fe1b.tar.gz bcm5719-llvm-852ed06d60b94b2ab302b238028dcd5ddf22fe1b.zip | |
sizeof() return size in bytes, not bits, patch by Nuno Lopes!
llvm-svn: 44316
| -rw-r--r-- | clang/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/AST/Expr.cpp b/clang/AST/Expr.cpp index fa1a3c95fff..77221392f23 100644 --- a/clang/AST/Expr.cpp +++ b/clang/AST/Expr.cpp @@ -589,7 +589,7 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx, // 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()); |

