File tree Expand file tree Collapse file tree
src/Likely Bugs/Likely Typos
test/query-tests/Likely Bugs/Likely Typos/AssignWhereCompareMeant Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class BooleanControllingAssignmentInExpr extends BooleanControllingAssignment {
5555 this .getConversion ( ) .( ParenthesisExpr ) .isParenthesised ( )
5656 or
5757 // whitelist this assignment if all comparison operations in the expression that this
58- // assignment is part of, are ot parenthesized. In that case it seems like programmer
58+ // assignment is part of, are not parenthesized. In that case it seems like programmer
5959 // is fine with unparenthesized comparison operands to binary logical operators, and
6060 // the parenthesis around this assignment was used to call it out as an assignment.
6161 this .isParenthesised ( ) and
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ void g(int *i_p, int cond) {
102102template <typename >
103103void h () {
104104 int x;
105- if (x = 0 ) { // GOOD: x is not initialized so this is probably intensional
105+ if (x = 0 ) { // GOOD: x is not initialized so this is probably intentional
106106 }
107107
108108 int y = 0 ;
@@ -152,4 +152,4 @@ void f3(int x, int y) {
152152
153153 if ((x == 10 ) || ((z == z) && (x == 1 )) && (y = 2 )) { // BAD
154154 }
155- }
155+ }
You can’t perform that action at this time.
0 commit comments