This revision was automatically updated to reflect the committed changes.
Closed by commit rL302880: [analyzer] Add modelling of __builtin_assume
(authored by xazax).
Changed prior to commit:
https://reviews.llvm.org/D33092?vs=98609&id=98731#toc
Repository:
rL LLVM
https://reviews.llvm.org/
NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Great, thanks!
Comment at: lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp:51
+state = state->assume(ArgSVal.castAs(), true);
+// FIXME: do we want to warn here?
+
xazax.hun added a comment.
In https://reviews.llvm.org/D33092#752039, @NoQ wrote:
> Hmm, shouldn't this be part of `BuiltinFunctionChecker` aka
> `core.builtin.BuiltinFunctions`? We already have `__builtin_assume_aligned`
> here (though it doesn't seem to assume anything because that particular
xazax.hun updated this revision to Diff 98609.
xazax.hun marked an inline comment as done.
xazax.hun edited the summary of this revision.
xazax.hun added a comment.
- Move this to the right checker.
https://reviews.llvm.org/D33092
Files:
lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
NoQ added a comment.
Hmm, shouldn't this be part of `BuiltinFunctionChecker` aka
`core.builtin.BuiltinFunctions`? We already have `__builtin_assume_aligned`
here (though it doesn't seem to assume anything because that particular
assumption is hard to model).
Comment at: lib/
xazax.hun created this revision.
Herald added subscribers: whisperity, mgorny.
I added a checker to model builtin functions. Only one builtin function is
modelled so far. The motivation behind using `__builtin_assume` from the
analyzers point of view is to add assumptions. The conventional way t