clang
15.0.0git
|
This class is a utility class that contains utility functions for building custom constraints. More...
#include "clang/Analysis/CloneDetection.h"
Static Public Member Functions | |
static void | filterGroups (std::vector< CloneDetector::CloneGroup > &CloneGroups, llvm::function_ref< bool(const CloneDetector::CloneGroup &)> Filter) |
Removes all groups by using a filter function. More... | |
static void | splitCloneGroups (std::vector< CloneDetector::CloneGroup > &CloneGroups, llvm::function_ref< bool(const StmtSequence &, const StmtSequence &)> Compare) |
Splits the given CloneGroups until the given Compare function returns true for all clones in a single group. More... | |
This class is a utility class that contains utility functions for building custom constraints.
Definition at line 222 of file CloneDetection.h.
|
inlinestatic |
Removes all groups by using a filter function.
CloneGroups | The list of CloneGroups that is supposed to be filtered. |
Filter | The filter function that should return true for all groups that should be removed from the list. |
Definition at line 229 of file CloneDetection.h.
References clang::tooling::Filter.
Referenced by clang::MinComplexityConstraint::constrain(), clang::MinGroupSizeConstraint::constrain(), and clang::FilenamePatternConstraint::constrain().
|
static |
Splits the given CloneGroups until the given Compare function returns true for all clones in a single group.
CloneGroups | A list of CloneGroups that should be modified. |
Compare | The comparison function that all clones are supposed to pass. Should return true if and only if two clones belong to the same CloneGroup. |
Definition at line 474 of file CloneDetection.cpp.
References c, clang::interp::Compare(), and clang::Prototype.
Referenced by clang::RecursiveCloneTypeIIVerifyConstraint::constrain(), and clang::MatchingVariablePatternConstraint::constrain().