Skip to content

Commit

Permalink
[clang][NFC] Use no-param version of skipRValueSubobjectAdjustments
Browse files Browse the repository at this point in the history
when possible.
  • Loading branch information
tbaederr committed Jan 30, 2024
1 parent 2fb3c9b commit c61686e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions clang/lib/Analysis/CFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1788,10 +1788,7 @@ static QualType getReferenceInitTemporaryType(const Expr *Init,
}

// Skip sub-object accesses into rvalues.
SmallVector<const Expr *, 2> CommaLHSs;
SmallVector<SubobjectAdjustment, 2> Adjustments;
const Expr *SkippedInit =
Init->skipRValueSubobjectAdjustments(CommaLHSs, Adjustments);
const Expr *SkippedInit = Init->skipRValueSubobjectAdjustments();
if (SkippedInit != Init) {
Init = SkippedInit;
continue;
Expand Down
5 changes: 1 addition & 4 deletions clang/lib/CodeGen/CGExprConstant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2080,10 +2080,7 @@ ConstantLValue
ConstantLValueEmitter::VisitMaterializeTemporaryExpr(
const MaterializeTemporaryExpr *E) {
assert(E->getStorageDuration() == SD_Static);
SmallVector<const Expr *, 2> CommaLHSs;
SmallVector<SubobjectAdjustment, 2> Adjustments;
const Expr *Inner =
E->getSubExpr()->skipRValueSubobjectAdjustments(CommaLHSs, Adjustments);
const Expr *Inner = E->getSubExpr()->skipRValueSubobjectAdjustments();
return CGM.GetAddrOfGlobalTemporary(E, Inner);
}

Expand Down
5 changes: 1 addition & 4 deletions clang/lib/Sema/JumpDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,8 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S,
// automatic storage duration.
MaterializeTemporaryExpr *MTE = cast<MaterializeTemporaryExpr>(S);
if (MTE->getStorageDuration() == SD_Automatic) {
SmallVector<const Expr *, 4> CommaLHS;
SmallVector<SubobjectAdjustment, 4> Adjustments;
const Expr *ExtendedObject =
MTE->getSubExpr()->skipRValueSubobjectAdjustments(CommaLHS,
Adjustments);
MTE->getSubExpr()->skipRValueSubobjectAdjustments();
if (ExtendedObject->getType().isDestructedType()) {
Scopes.push_back(GotoScope(ParentScope, 0,
diag::note_exits_temporary_dtor,
Expand Down

0 comments on commit c61686e

Please sign in to comment.