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.
14 lines
349 B
C++
14 lines
349 B
C++
// Same method signatures but different semantics. Class-dup detector MUST
|
|
// NOT flag — the ratio of equivalent methods is 0/2.
|
|
|
|
class FormatA {
|
|
public:
|
|
int adjust(int x) { return x + 10; }
|
|
int weight(int x) { return x * 3; }
|
|
};
|
|
|
|
class FormatB {
|
|
public:
|
|
int adjust(int x) { return x - 10; }
|
|
int weight(int x) { return x * 5; }
|
|
};
|