Skip to content

Commit c61686e

Browse files
committed
[clang][NFC] Use no-param version of skipRValueSubobjectAdjustments
when possible.
1 parent 2fb3c9b commit c61686e

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

clang/lib/Analysis/CFG.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,10 +1788,7 @@ static QualType getReferenceInitTemporaryType(const Expr *Init,
17881788
}
17891789

17901790
// Skip sub-object accesses into rvalues.
1791-
SmallVector<const Expr *, 2> CommaLHSs;
1792-
SmallVector<SubobjectAdjustment, 2> Adjustments;
1793-
const Expr *SkippedInit =
1794-
Init->skipRValueSubobjectAdjustments(CommaLHSs, Adjustments);
1791+
const Expr *SkippedInit = Init->skipRValueSubobjectAdjustments();
17951792
if (SkippedInit != Init) {
17961793
Init = SkippedInit;
17971794
continue;

clang/lib/CodeGen/CGExprConstant.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,10 +2080,7 @@ ConstantLValue
20802080
ConstantLValueEmitter::VisitMaterializeTemporaryExpr(
20812081
const MaterializeTemporaryExpr *E) {
20822082
assert(E->getStorageDuration() == SD_Static);
2083-
SmallVector<const Expr *, 2> CommaLHSs;
2084-
SmallVector<SubobjectAdjustment, 2> Adjustments;
2085-
const Expr *Inner =
2086-
E->getSubExpr()->skipRValueSubobjectAdjustments(CommaLHSs, Adjustments);
2083+
const Expr *Inner = E->getSubExpr()->skipRValueSubobjectAdjustments();
20872084
return CGM.GetAddrOfGlobalTemporary(E, Inner);
20882085
}
20892086

clang/lib/Sema/JumpDiagnostics.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,11 +577,8 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S,
577577
// automatic storage duration.
578578
MaterializeTemporaryExpr *MTE = cast<MaterializeTemporaryExpr>(S);
579579
if (MTE->getStorageDuration() == SD_Automatic) {
580-
SmallVector<const Expr *, 4> CommaLHS;
581-
SmallVector<SubobjectAdjustment, 4> Adjustments;
582580
const Expr *ExtendedObject =
583-
MTE->getSubExpr()->skipRValueSubobjectAdjustments(CommaLHS,
584-
Adjustments);
581+
MTE->getSubExpr()->skipRValueSubobjectAdjustments();
585582
if (ExtendedObject->getType().isDestructedType()) {
586583
Scopes.push_back(GotoScope(ParentScope, 0,
587584
diag::note_exits_temporary_dtor,

0 commit comments

Comments
 (0)