Commit Graph

5 Commits

Author SHA1 Message Date
Artem Dergachev da9e718fb4 [analyzer] Reland r299544 "Add a modular constraint system to the CloneDetector"
Hopefully fix crashes by unshadowing the variable.


Original commit message:

A big part of the clone detection code is functionality for filtering clones and
clone groups based on different criteria. So far this filtering process was
hardcoded into the CloneDetector class, which made it hard to understand and,
ultimately, to extend.

This patch splits the CloneDetector's logic into a sequence of reusable
constraints that are used for filtering clone groups. These constraints
can be turned on and off and reodreder at will, and new constraints are easy
to implement if necessary.

Unit tests are added for the new constraint interface.

This is a refactoring patch - no functional change intended.

Patch by Raphael Isemann!

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

llvm-svn: 299653
2017-04-06 14:34:07 +00:00
Artem Dergachev c4aee48b9f Revert "[analyzer] Add a modular constraint system to the CloneDetector"
This reverts commit r299544.

Crashes on tests on some buildbots.

llvm-svn: 299550
2017-04-05 15:06:17 +00:00
Artem Dergachev f8b4fc38fd [analyzer] Add a modular constraint system to the CloneDetector
A big part of the clone detection code is functionality for filtering clones and
clone groups based on different criteria. So far this filtering process was
hardcoded into the CloneDetector class, which made it hard to understand and,
ultimately, to extend.

This patch splits the CloneDetector's logic into a sequence of reusable
constraints that are used for filtering clone groups. These constraints
can be turned on and off and reodreder at will, and new constraints are easy
to implement if necessary.

Unit tests are added for the new constraint interface.

This is a refactoring patch - no functional change intended.

Patch by Raphael Isemann!

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

llvm-svn: 299544
2017-04-05 14:17:36 +00:00
NAKAMURA Takumi 097a2b9c88 CFGTests: Update libdeps.
llvm-svn: 274885
2016-07-08 17:06:27 +00:00
Alexander Kornienko ff2046a93e CFGBuilder: Fix crash when visiting a range-based for over a dependent type
Summary:
CFG generation is expected to fail in this case, but it should not crash.

Also added a test that reproduces the crash.

Reviewers: klimek

Subscribers: cfe-commits

Patch by Martin Boehme!

Differential Revision: http://reviews.llvm.org/D21895

llvm-svn: 274834
2016-07-08 10:50:51 +00:00