We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 869be94 commit af825dbCopy full SHA for af825db
csharp/ql/lib/semmle/code/csharp/commons/Strings.qll
@@ -49,6 +49,16 @@ class ImplicitToStringExpr extends Expr {
49
this = add.getOtherOperand(o).stripImplicit()
50
)
51
or
52
+ // s1 += s2 for where the left hand side is a string, call an operator +(string, object)
53
+ exists(AssignAddExpr add, Operator o, Parameter p0, Parameter p1 |
54
+ o = add.getTarget() and
55
+ o.getName() = "+" and
56
+ p0 = o.getParameter(0) and
57
+ p1 = o.getParameter(1) and
58
+ p0.getType() instanceof StringType and
59
+ this = getAnAssignedArgumentOrParam(p1).stripImplicit()
60
+ )
61
+ or
62
this = any(InterpolatedStringExpr ise).getAnInsert().stripImplicit()
63
}
64
0 commit comments