Clang LibTooling + Z3 BV-64 encoding. 11 detectors: clone, equiv, class-dup, dead, null-deref, div-by-zero, int-overflow, oob, int-truncation, sign-conversion, taint-track. Interfaces: CLI, MCP (JSON-RPC 2.0), LSP. Output: SARIF 2.1.0, JSON, Markdown.
12 lines
337 B
C++
12 lines
337 B
C++
// External call inside the condition forces a bail. Even though the literal
|
|
// `if (false)` further down looks dead, the function is skipped entirely once
|
|
// the bail is raised. Documents the conservative-on-unknown contract.
|
|
|
|
extern int opaque();
|
|
|
|
int bailout(int x) {
|
|
if (opaque() == 0) {
|
|
return -1;
|
|
}
|
|
return x;
|
|
}
|