mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
C++: Fix ValueNumbering for CopyInstruction
Querying for overlap type wasn't possible when this library was first written. This change fixes FPs in `RedundantNullCheckSimple.ql` on Wireshark and other real-world projects.
This commit is contained in:
@@ -105,7 +105,7 @@ struct S {
|
||||
long **pplong;
|
||||
|
||||
void test_phi() {
|
||||
while (*pplong != nullptr) { // GOOD [FALSE POSITIVE]
|
||||
while (*pplong != nullptr) { // GOOD
|
||||
pplong++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,3 @@
|
||||
| RedundantNullCheckSimple.cpp:48:12:48:12 | Load: p | This null check is redundant because the value is $@ in any case | RedundantNullCheckSimple.cpp:51:10:51:11 | Load: * ... | dereferenced here |
|
||||
| RedundantNullCheckSimple.cpp:79:7:79:9 | Load: * ... | This null check is redundant because the value is $@ in any case | RedundantNullCheckSimple.cpp:78:7:78:10 | Load: * ... | dereferenced here |
|
||||
| RedundantNullCheckSimple.cpp:93:13:93:13 | Load: p | This null check is redundant because the value is $@ in any case | RedundantNullCheckSimple.cpp:92:13:92:18 | Load: * ... | dereferenced here |
|
||||
| RedundantNullCheckSimple.cpp:108:12:108:18 | Load: * ... | This null check is redundant because the value is $@ in any case | RedundantNullCheckSimple.cpp:108:12:108:18 | Load: * ... | dereferenced here |
|
||||
|
||||
Reference in New Issue
Block a user