mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
CPP: Exception for AsmStmts.
This commit is contained in:
@@ -46,6 +46,10 @@ predicate functionImperfectlyExtracted(Function f) {
|
||||
exists(ErrorExpr ee | ee.getEnclosingFunction() = f)
|
||||
or
|
||||
count(f.getType()) > 1
|
||||
or
|
||||
// an `AsmStmt` isn't strictly 'imperfectly extracted', but it's beyond the scope
|
||||
// of this analysis.
|
||||
exists(AsmStmt asm | asm.getEnclosingFunction() = f)
|
||||
}
|
||||
|
||||
from Stmt stmt, string msg, Function f, ControlFlowNode blame
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
| test.c:8:5:8:14 | declaration | Function f2 should return a value of type int but does not return a value here |
|
||||
| test.c:25:9:25:14 | ExprStmt | Function f4 should return a value of type int but does not return a value here |
|
||||
| test.c:39:9:39:14 | ExprStmt | Function f6 should return a value of type int but does not return a value here |
|
||||
| test.c:100:2:100:18 | asm statement | Function f14 should return a value of type int but does not return a value here |
|
||||
| test.cpp:16:1:18:1 | { ... } | Function g2 should return a value of type MyValue but does not return a value here |
|
||||
| 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 |
|
||||
|
||||
@@ -97,5 +97,5 @@ void f13_func(int x)
|
||||
|
||||
int f14()
|
||||
{
|
||||
__asm__("rdtsc"); // GOOD [FALSE POSITIVE]
|
||||
__asm__("rdtsc"); // GOOD
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user