- Notifications
You must be signed in to change notification settings - Fork 15.3k
Labels
Description
We already handle __builtin_assume calls inside the BuiltinFunctionChecker.
We should also handle the attribute variant of this, e.g.:
https://compiler-explorer.com/z/oq6nY7eqE
void clang_analyzer_printState(); extern int arr[10]; void using_assume_attr(int x) { [[assume(x > 100)]]; // NullStmt with an attribute //clang_analyzer_printState(); arr[x] = 404; // FIXME: we don't raise this! } void using_builtin(int x) { __builtin_assume(x > 100); // CallExpr //clang_analyzer_printState(); arr[x] = 404; // caught! }