From: Ken Dyck Date: Fri, 14 Jan 2011 02:01:36 +0000 (+0000) Subject: Replace a literal '8' with getCharWidth(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e26caa0365347eb63d483df29cdf86ca084510c;p=clang Replace a literal '8' with getCharWidth(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123421 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 8761aa3f94..57ceb3f481 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -404,7 +404,8 @@ bool LValueExprEvaluator::VisitMemberExpr(MemberExpr *E) { break; } - Result.Offset += CharUnits::fromQuantity(RL.getFieldOffset(i) / 8); + Result.Offset += + CharUnits::fromQuantity(RL.getFieldOffset(i) / Info.Ctx.getCharWidth()); return true; }