mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
JS: be conservative in presence of NaN comments
This commit is contained in:
@@ -50,3 +50,15 @@ function h(x, y) {
|
||||
if (x > y) {} // NOT OK - always true
|
||||
}
|
||||
}
|
||||
|
||||
function nan(x) {
|
||||
// This is a NaN comment.
|
||||
if (x - 1 < x) {} // OK
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a NAN comment.
|
||||
*/
|
||||
function nan2(x) {
|
||||
if (x - 1 < x) {} // OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user