class CloneConstraint
Declaration
class CloneConstraint { /* full declaration omitted */ };
Description
This class is a utility class that contains utility functions for building custom constraints.
Declared at: clang/include/clang/Analysis/CloneDetection.h:222
Method Overview
- public static void filterGroups(std::vector<CloneDetector::CloneGroup> & CloneGroups, llvm::function_ref<bool (const CloneDetector::CloneGroup &)> Filter)
- public static void splitCloneGroups(std::vector<CloneDetector::CloneGroup> & CloneGroups, llvm::function_ref<bool (const StmtSequence &, const StmtSequence &)> Compare)
Methods
¶static void filterGroups(
std::vector<CloneDetector::CloneGroup>&
CloneGroups,
llvm::function_ref<bool(
const CloneDetector::CloneGroup&)> Filter)
static void filterGroups(
std::vector<CloneDetector::CloneGroup>&
CloneGroups,
llvm::function_ref<bool(
const CloneDetector::CloneGroup&)> Filter)
Description
Removes all groups by using a filter function.
Declared at: clang/include/clang/Analysis/CloneDetection.h:229
Parameters
- std::vector<CloneDetector::CloneGroup>& CloneGroups
- The list of CloneGroups that is supposed to be filtered.
- llvm::function_ref<bool( const CloneDetector::CloneGroup&)> Filter
- The filter function that should return true for all groups that should be removed from the list.
¶static void splitCloneGroups(
std::vector<CloneDetector::CloneGroup>&
CloneGroups,
llvm::function_ref<bool(const StmtSequence&,
const StmtSequence&)>
Compare)
static void splitCloneGroups(
std::vector<CloneDetector::CloneGroup>&
CloneGroups,
llvm::function_ref<bool(const StmtSequence&,
const StmtSequence&)>
Compare)
Description
Splits the given CloneGroups until the given Compare function returns true for all clones in a single group.
Declared at: clang/include/clang/Analysis/CloneDetection.h:241
Parameters
- std::vector<CloneDetector::CloneGroup>& CloneGroups
- A list of CloneGroups that should be modified.
- llvm::function_ref<bool(const StmtSequence&, const StmtSequence&)> 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.