Skip to content

Commit acca94e

Browse files
Update clang/lib/Analysis/FlowSensitive/Transfer.cpp
Co-authored-by: martinboehme <[email protected]>
1 parent 6af0f59 commit acca94e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

clang/lib/Analysis/FlowSensitive/Transfer.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,13 @@ class TransferVisitor : public ConstStmtVisitor<TransferVisitor> {
536536

537537
copyRecord(*LocSrc, *LocDst, Env);
538538
Env.setStorageLocation(*S, *LocDst);
539-
} else {
540-
// CXXOperatorCallExpr can be prvalues, in which case we must create a
541-
// record for them in order for `Environment::getResultObjectLocation()`
542-
// to be able to return a value.
543-
VisitCallExpr(S);
539+
return;
544540
}
541+
542+
// CXXOperatorCallExpr can be prvalues. Call `VisitCallExpr`() to create
543+
// a `RecordValue` for them so that `Environment::getResultObjectLocation()`
544+
// can return a value.
545+
VisitCallExpr(S);
545546
}
546547

547548
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *S) {

0 commit comments

Comments
 (0)