mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Add test in C file with pointer type guard.
This commit is contained in:
@@ -26,6 +26,9 @@
|
||||
| test.c:137:7:137:7 | 0 |
|
||||
| test.c:146:7:146:8 | ! ... |
|
||||
| test.c:146:8:146:8 | x |
|
||||
| test.c:152:8:152:8 | p |
|
||||
| test.c:158:8:158:9 | ! ... |
|
||||
| test.c:158:9:158:9 | p |
|
||||
| test.cpp:18:8:18:10 | call to get |
|
||||
| test.cpp:31:7:31:13 | ... == ... |
|
||||
| test.cpp:42:13:42:20 | call to getABool |
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
| test.c:137:7:137:7 | 0 | false | 142 | 136 |
|
||||
| test.c:146:7:146:8 | ! ... | true | 146 | 147 |
|
||||
| test.c:146:8:146:8 | x | false | 146 | 147 |
|
||||
| test.c:152:8:152:8 | p | true | 152 | 154 |
|
||||
| test.c:158:8:158:9 | ! ... | true | 158 | 160 |
|
||||
| test.c:158:9:158:9 | p | false | 158 | 160 |
|
||||
| test.cpp:18:8:18:10 | call to get | true | 19 | 19 |
|
||||
| test.cpp:31:7:31:13 | ... == ... | false | 30 | 30 |
|
||||
| test.cpp:31:7:31:13 | ... == ... | false | 34 | 34 |
|
||||
|
||||
@@ -147,3 +147,15 @@ void test5(int x) {
|
||||
test3();
|
||||
}
|
||||
}
|
||||
|
||||
void test6(char* p) {
|
||||
if(p) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void test7(char* p) {
|
||||
if(!p) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user