Commit Graph

8 Commits

Author SHA1 Message Date
George Karpenkov a393e68b27 [analyzer] Move analyzer-eagerly-assume to AnalyzerOptions, enable by default
Differential Revision: https://reviews.llvm.org/D51251

llvm-svn: 340963
2018-08-29 20:29:17 +00:00
George Karpenkov 7d0f5ab6aa [analyzer] [tests] Again, make tests more resilient to changes in exploration strategy
llvm-svn: 326529
2018-03-02 01:41:19 +00:00
George Karpenkov 7596b82102 [analyzer] [NFC] [tests] Make test more resilient to changes in exploration strategy
llvm-svn: 326518
2018-03-02 00:54:05 +00:00
George Karpenkov 06b7bd61f4 [analyzer] Switch the default exploration strategy to priority queue based on coverage
After the investigation it seems safe to flip the switch.

Differential Revision: https://reviews.llvm.org/D43782

llvm-svn: 326157
2018-02-27 01:31:56 +00:00
Peter Szecsi 07964fbdcb [analyzer] MisusedMovedObjectChecker: More precise warning message
Added new enum in order to differentiate the warning messages on "misusing" into
3 categories: function calls, moving an object, copying an object. (At the
moment the checker gives the same message in case of copying and moving.)

Additional test cases added as well.

Differential Revision: https://reviews.llvm.org/D38674

llvm-svn: 316852
2017-10-28 23:24:00 +00:00
Peter Szecsi 65f8f83a74 [analyzer] MisusedMovedObjectChecker: Fix false positive on state-resetting, handling method calls on base-class sub-objects
An earlier solution from Artem r315301 solves the reset problem, however, the
reports should be handled the same way in case of method calls. We should not
just report the base class of the object where the method was defined but the
whole object.

Fixed false positive which came from not removing the subobjects in case of a
state-resetting function. (Just replaced the State->remove(...) call to
removeFromState(..) which was defined exactly for that purpose.)

Some minor typos fixed in this patch as well which did not worth a whole new
patch in my opinion, so included them here.

Differential Revision: https://reviews.llvm.org/D31538

llvm-svn: 316850
2017-10-28 23:09:37 +00:00
Artem Dergachev 0f22a06b4d [analyzer] MisusedMovedObject: Fix state-resetting a base-class sub-object.
If a method is resetting the state of an object that was moved from, it should
be safe to use this object again. However if the method was defined in a parent
class, but used in a child class, the reset didn't happen from the checker's
perspective.

Differential Revision: https://reviews.llvm.org/D31538

llvm-svn: 315301
2017-10-10 11:55:56 +00:00
Artem Dergachev 356151ff5f [analyzer] Add MisusedMovedObjectChecker for detecting use-after-move errors.
The checker currently warns on copying, moving, or calling methods on an object
that was recently std::move'd from. It understands a set of "state reset"
methods that bring a moved-from object back to a well-specified state.

Patch by Peter Szecsi!

Differential Revision: https://reviews.llvm.org/D24246

llvm-svn: 298698
2017-03-24 09:52:30 +00:00