clang: lib/Analysis/CloneDetection.cpp File Reference (original) (raw)
#include "[clang/Analysis/CloneDetection.h](CloneDetection%5F8h%5Fsource.html)"
#include "[clang/AST/Attr.h](AST%5F2Attr%5F8h%5Fsource.html)"
#include "[clang/AST/DataCollection.h](DataCollection%5F8h%5Fsource.html)"
#include "[clang/AST/DeclTemplate.h](DeclTemplate%5F8h%5Fsource.html)"
#include "[clang/Basic/SourceManager.h](SourceManager%5F8h%5Fsource.html)"
#include "llvm/Support/MD5.h"
#include "llvm/Support/Path.h"
#include "clang/AST/StmtDataCollectors.inc"
Go to the source code of this file.
Functions | |
---|---|
static bool | containsAnyInGroup (StmtSequence &Seq, CloneDetector::CloneGroup &Group) |
Returns true if and only if Stmt contains at least one other sequence in the Group. | |
static bool | containsGroup (CloneDetector::CloneGroup &Group, CloneDetector::CloneGroup &OtherGroup) |
Returns true if and only if all sequences in OtherGroup are contained by a sequence in Group. | |
static size_t | createHash (llvm::MD5 &Hash) |
static size_t | saveHash (const Stmt *S, const Decl *D, std::vector< std::pair< size_t, StmtSequence > > &StmtsByHash) |
Generates and saves a hash code for the given Stmt. | |
static void | CollectStmtSequenceData (const StmtSequence &Sequence, FoldingSetNodeIDWrapper &OutputData) |
Writes the relevant data from all statements and child statements in the given StmtSequence into the given FoldingSetNodeID. | |
static bool | areSequencesClones (const StmtSequence &LHS, const StmtSequence &RHS) |
Returns true if both sequences are clones of each other. | |
◆ DEF_ADD_DATA
| #define DEF_ADD_DATA | ( | | CLASS, | | ---------------------- | - | | ------ | | | CODE | | | | | ) | | | |
Value:
template <class = void> void Visit##CLASS(const CLASS *S) { \
CODE; \
}
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition at line 200 of file CloneDetection.cpp.
◆ SKIP
◆ areSequencesClones()
◆ CollectStmtSequenceData()
static void CollectStmtSequenceData ( const StmtSequence & Sequence, FoldingSetNodeIDWrapper & OutputData ) | static |
---|
◆ containsAnyInGroup()
◆ containsGroup()
◆ createHash()
static size_t createHash ( llvm::MD5 & Hash) | static |
---|