Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f80c13a

Browse files
committed
C++: Fixed incorrect comments in testcases
1 parent d9f931d commit f80c13a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • cpp/ql/test/query-tests/Likely Bugs/Likely Typos/AssignWhereCompareMeant

cpp/ql/test/query-tests/Likely Bugs/Likely Typos/AssignWhereCompareMeant/test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void f2() {
126126
}
127127

128128
void f3(int x, int y) {
129-
if(x == 1 && (y = 2)) { // GOOD [FALSE POSITIVE]: the programmer seems to be okay with unparenthesized
129+
if(x == 1 && (y = 2)) { // GOOD: the programmer seems to be okay with unparenthesized
130130
// comparison operands, so the parenthesis was used to mark this
131131
// as an assignment
132132
}
@@ -138,13 +138,13 @@ void f3(int x, int y) {
138138
if(((z == 42) || (y = 2)) && (x == 1)) { // BAD
139139
}
140140

141-
if((y = 2) && (x == z || x == 1)) { // GOOD [FALSE POSITIVE]
141+
if((y = 2) && (x == z || x == 1)) { // GOOD
142142
}
143143

144144
if(((x == 42) || x == 1) && (y = 2)) { // BAD
145145
}
146146

147-
if(x == 10 || (x == 42 && x == 1) && (y = 2)) { // GOOD [FALSE POSITIVE]
147+
if(x == 10 || (x == 42 && x == 1) && (y = 2)) { // GOOD
148148
}
149149

150150
if(x == 10 || ((x == 42) && (y = 2)) && (z == 1)) { // BAD

0 commit comments

Comments
 (0)