[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-07-19 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. As an aside, I think it'd be good to land https://reviews.llvm.org/D28954 and https://reviews.llvm.org/D28955 first, since they affect accuracy and precision of various analyzer parts that this depends on. > Here are some examples that should all be UNKNOWN (right?) but ar

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-07-15 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. This looks like a very solid start! One area that I'm very worried about is that in various places the analyzer makes assumptions about algebraic simplifications that don't hold for floating point because of NaN and other floating point oddities. I think it really im

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-07-12 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Thanks for the patch, and apologies for the delay reviewing! Here are some initial comments -- there are more coming. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:159 +llvm::APFloat To(S, llvm::APFloat::uniniti

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-05-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 99522. ddcc added a comment. Herald added a subscriber: eraman. Rebase, avoid generating floating-point constraints if unsupported by constraint manager https://reviews.llvm.org/D28954 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-05-14 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D28954#754478, @lirhea wrote: > In https://reviews.llvm.org/D28954#714936, @ddcc wrote: > > > Rebase, update tests, fix bugs > > > Excuse me,I want to download full codes of this version,but I have no idea > how to do it,can you tell me? > And m

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-05-14 Thread chen, zheyu via Phabricator via cfe-commits
lirhea added a comment. In https://reviews.llvm.org/D28954#714936, @ddcc wrote: > Rebase, update tests, fix bugs Excuse me,I want to download full codes of this version,but I have no idea how to do it,can you tell me? And my system is windows. https://reviews.llvm.org/D28954 _

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93590. ddcc added a comment. Rebase, update tests, fix bugs https://reviews.llvm.org/D28954 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/Pat

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-01-22 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 85315. ddcc added a comment. Rebase https://reviews.llvm.org/D28954 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintMan

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-01-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. - This patch introduces a virtual overloaded `llvm::APFloat getSymVal()` for returning the value of known floating-point constants. In the long term, both `getSymVal()` functions should probably be refactored to return something like a `llvm::Con - There are also long-term

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-01-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. Herald added a subscriber: mgorny. With the Z3 constraint manager, symbolic floating-point constraints can also be reasoned about. This commit includes a basic floating-point checker for domain errors with math functions. https://reviews.llvm.org/D28954 Files: in