aboutsummaryrefslogtreecommitdiff
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.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 149b7d7..a07eb22 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -4074,8 +4074,7 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj,
}
// Next subobject is a class, struct or union field.
- RecordDecl *RD =
- ObjType->castAsCanonical<RecordType>()->getOriginalDecl();
+ RecordDecl *RD = ObjType->castAsCanonical<RecordType>()->getDecl();
if (RD->isUnion()) {
const FieldDecl *UnionField = O->getUnionField();
if (!UnionField ||
@@ -7810,7 +7809,7 @@ class BufferToAPValueConverter {
std::optional<APValue> visit(const EnumType *Ty, CharUnits Offset) {
QualType RepresentationType =
- Ty->getOriginalDecl()->getDefinitionOrSelf()->getIntegerType();
+ Ty->getDecl()->getDefinitionOrSelf()->getIntegerType();
assert(!RepresentationType.isNull() &&
"enum forward decl should be caught by Sema");
const auto *AsBuiltin =
@@ -8607,7 +8606,7 @@ public:
const FieldDecl *FD = dyn_cast<FieldDecl>(E->getMemberDecl());
if (!FD) return Error(E);
assert(!FD->getType()->isReferenceType() && "prvalue reference?");
- assert(BaseTy->castAsCanonical<RecordType>()->getOriginalDecl() ==
+ assert(BaseTy->castAsCanonical<RecordType>()->getDecl() ==
FD->getParent()->getCanonicalDecl() &&
"record / field mismatch");
@@ -8836,7 +8835,7 @@ public:
const ValueDecl *MD = E->getMemberDecl();
if (const FieldDecl *FD = dyn_cast<FieldDecl>(E->getMemberDecl())) {
- assert(BaseTy->castAsCanonical<RecordType>()->getOriginalDecl() ==
+ assert(BaseTy->castAsCanonical<RecordType>()->getDecl() ==
FD->getParent()->getCanonicalDecl() &&
"record / field mismatch");
(void)BaseTy;