|
clang
5.0.0
|
Ensures that every clone has at least the given complexity. More...
#include "clang/Analysis/CloneDetection.h"
Public Member Functions | |
| MinComplexityConstraint (unsigned MinComplexity) | |
| size_t | calculateStmtComplexity (const StmtSequence &Seq, const std::string &ParentMacroStack="") |
| void | constrain (std::vector< CloneDetector::CloneGroup > &CloneGroups) |
Ensures that every clone has at least the given complexity.
Complexity is here defined as the total amount of children of a statement. This constraint assumes the first statement in the group is representative for all other statements in the group in terms of complexity.
Definition at line 470 of file CloneDetection.h.
|
inline |
Definition at line 474 of file CloneDetection.h.
| size_t MinComplexityConstraint::calculateStmtComplexity | ( | const StmtSequence & | Seq, |
| const std::string & | ParentMacroStack = "" |
||
| ) |
Definition at line 386 of file CloneDetection.cpp.
References clang::Stmt::children(), Context, clang::StmtSequence::empty(), clang::StmtSequence::front(), clang::StmtSequence::getASTContext(), clang::StmtSequence::getContainingDecl(), clang::StmtSequence::getEndLoc(), clang::clone_detection::getMacroStack(), clang::StmtSequence::getStartLoc(), and clang::StmtSequence::holdsSequence().
|
inline |
Definition at line 480 of file CloneDetection.h.
References clang::CloneConstraint::filterGroups().
1.8.6