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.
8 lines
214 B
C++
8 lines
214 B
C++
// rhs is guarded against zero. Detector should NOT flag — the path
|
|
// predicate inside the if rules out (y == 0).
|
|
int divide_guarded(int x, int y) {
|
|
if (y != 0) {
|
|
return x / y;
|
|
}
|
|
return 0;
|
|
}
|