summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index d23eac24d4c..ced38398124 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -594,7 +594,7 @@ bool PointerExprEvaluator::VisitCastExpr(CastExpr* E) {
const CXXRecordDecl *BaseDecl = Base->getType()->getAsCXXRecordDecl();
const ASTRecordLayout &Layout = Info.Ctx.getASTRecordLayout(DerivedDecl);
- Offset += Layout.getBaseClassOffset(BaseDecl);
+ Offset += Layout.getBaseClassOffsetInBits(BaseDecl);
DerivedDecl = BaseDecl;
}
@@ -1621,7 +1621,7 @@ bool IntExprEvaluator::VisitOffsetOfExpr(const OffsetOfExpr *E) {
// Add the offset to the base.
Result += CharUnits::fromQuantity(
- RL.getBaseClassOffset(cast<CXXRecordDecl>(BaseRT->getDecl()))
+ RL.getBaseClassOffsetInBits(cast<CXXRecordDecl>(BaseRT->getDecl()))
/ Info.Ctx.getCharWidth());
break;
}
OpenPOWER on IntegriCloud