clang 19.0.0git

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, std::size_t Limit, const std::string &ParentMacroStack="") 
Calculates the complexity of the given StmtSequence.  
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 275 of file CloneDetection.h.

inline 
Definition at line 279 of file CloneDetection.h.
size_t MinComplexityConstraint::calculateStmtComplexity  (  const StmtSequence &  Seq, 
std::size_t  Limit,  
const std::string &  ParentMacroStack = "" 

) 
Calculates the complexity of the given StmtSequence.
Limit  The limit of complexity we probe for. After reaching this limit during calculation, this method is exiting early to improve performance and returns this limit. 
Definition at line 418 of file CloneDetection.cpp.
References calculateStmtComplexity(), clang::data_collection::getMacroStack(), and clang::Seq.
Referenced by calculateStmtComplexity(), and constrain().

inline 
Definition at line 289 of file CloneDetection.h.
References calculateStmtComplexity(), and clang::CloneConstraint::filterGroups().