Skip to content

Commit e2de39e

Browse files
authored
Merge pull request #8129 from hyp/eng/5.10/assertion-rm-fix
[5.10] Remove a bogus assertion.
2 parents 551823b + 2340617 commit e2de39e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

clang/include/clang/AST/PropertiesBase.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,20 +517,16 @@ let Class = PropertyTypeCase<APValue, "LValue"> in {
517517
def : Creator<[{
518518
(void)ctx;
519519
APValue::LValueBase base;
520-
QualType elemTy;
521520
if (hasBase) {
522521
if (isTypeInfo) {
523522
base = APValue::LValueBase::getTypeInfo(
524523
TypeInfoLValue(typeInfo.value().getTypePtr()), type.value());
525-
elemTy = base.getTypeInfoType();
526524
} else if (isExpr) {
527525
base = APValue::LValueBase(cast<Expr>(stmt.value()),
528526
callIndex.value(), version.value());
529-
elemTy = base.get<const Expr *>()->getType();
530527
} else {
531528
base = APValue::LValueBase(cast<ValueDecl>(decl.value()),
532529
callIndex.value(), version.value());
533-
elemTy = base.get<const ValueDecl *>()->getType();
534530
}
535531
}
536532
CharUnits offset = CharUnits::fromQuantity(offsetQuantity);
@@ -543,7 +539,6 @@ let Class = PropertyTypeCase<APValue, "LValue"> in {
543539
auto pathLength = lvaluePath->Path.size();
544540
APValue::LValuePathEntry *path = result.setLValueUninit(
545541
base, offset, pathLength, isLValueOnePastTheEnd, isNullPtr).data();
546-
assert(lvaluePath->getType() == elemTy && "Unexpected type reference!");
547542
llvm::copy(lvaluePath->Path, path);
548543
return result;
549544
}]>;

0 commit comments

Comments
 (0)