Skip to content

Commit 7742586

Browse files
committed
[5.9] [Sema] Add shouldWalkIntoTapExpression override for SingleValueStmtUsageChecker
This matches all the other MiscDiagnostics walkers, and is needed to avoid emitting a duplicate diagnostic for a string interpolation, since on 5.9 we type-check TapExprs separately. This isn't needed on main/5.10 since we now type-check them together with the whole expression.
1 parent e846570 commit 7742586

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/MiscDiagnostics.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3894,6 +3894,8 @@ class SingleValueStmtUsageChecker final : public ASTWalker {
38943894
return MacroWalking::ArgumentsAndExpansion;
38953895
}
38963896

3897+
bool shouldWalkIntoTapExpression() override { return false; }
3898+
38973899
AssignExpr *findAssignment(Expr *E) const {
38983900
// Don't consider assignments if we have a parent expression (as otherwise
38993901
// this would be effectively allowing it in an arbitrary expression

0 commit comments

Comments
 (0)