[cfe-dev] [analyzer] Introducing FloatingCompare checker
Kirill Bobyrev via cfe-dev
cfe-dev at lists.llvm.org
Thu Sep 3 01:05:53 PDT 2015
Uh, my bad!
I was checking whether such functionality was already implemented by
running analysis on the sample piece of code provided by the checker
description in the list, I didn't see any warning, so I assumed it's not
Thank you very much for the feedback! I'll pick another item from the
On 9/3/2015 8:39 AM, Anna Zaks wrote:
> Hi Kirill,
> The checkPreStmt callback should be used by checkers that require
> symbolic execution. Check out the video of our talk for introduction
> into how that works
> Looks like this checker is only performing a syntactic check, so using
> an AST visitor would be more appropriate
> However, most importantly, similar functionality is already
> implemented in the compiler (see -Wfloat-equal)! Looks like it does
> not work when comparing against a constant. I am not sure what the
> reason for that is; was it a a source of false positives or just an
> Since the warning is in place, we should remove this from the list of
> checkers to be implemented.
> Thank you,
>> On Sep 2, 2015, at 2:58 PM, Kirill Bobyrev via cfe-dev
>> <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
>> I've started implementing different.FloatingCompare checker from the
>> list of potential checkers
>> <http://clang-analyzer.llvm.org/potential_checkers.html>. I'd like to
>> gather some feedback and do some improvements in order to push the
>> code to the upstream in the near future.
>> Vassil Vassilev mentioned it might be reasonable if the checker could
>> detect that there is division which might yield precision loss and
>> then detect a check against a 'constant' values.
>> What do you think? What should be the checker's default behavior?
>> The first version of checker is attached.
>> Kirill Bobyrev
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev