mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
CPP: Remove successor edges from non-returning functions from the control flow graph.
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
| test.cpp:48:2:48:26 | if (...) ... | Function g7 should return a value of type MyValue but does not return a value here |
|
||||
| test.cpp:74:1:76:1 | { ... } | Function g10 should return a value of type second but does not return a value here |
|
||||
| test.cpp:86:1:88:1 | { ... } | Function g12 should return a value of type second but does not return a value here |
|
||||
| test.cpp:103:2:103:17 | ExprStmt | Function g13 should return a value of type int but does not return a value here |
|
||||
| test.cpp:108:2:111:2 | if (...) ... | Function g14 should return a value of type int but does not return a value here |
|
||||
| test.cpp:110:3:110:18 | ExprStmt | Function g14 should return a value of type int but does not return a value here |
|
||||
| test.cpp:120:3:120:18 | ExprStmt | Function g15 should return a value of type int but does not return a value here |
|
||||
| test.cpp:134:2:134:36 | ExprStmt | Function g16 should return a value of type int but does not return a value here |
|
||||
| test.cpp:141:3:141:37 | ExprStmt | Function g17 should return a value of type int but does not return a value here |
|
||||
| test.cpp:151:3:151:18 | ExprStmt | Function g18 should return a value of type int but does not return a value here |
|
||||
|
||||
@@ -100,7 +100,7 @@ void myThrow(const char *error)
|
||||
|
||||
int g13()
|
||||
{
|
||||
myThrow("fail"); // GOOD [FALSE POSITIVE]
|
||||
myThrow("fail"); // GOOD
|
||||
}
|
||||
|
||||
int g14(int x)
|
||||
@@ -117,7 +117,7 @@ int g15(int x)
|
||||
{
|
||||
return x;
|
||||
} else {
|
||||
myThrow("fail"); // GOOD [FALSE POSITIVE]
|
||||
myThrow("fail"); // GOOD
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user