clang  5.0.0
Classes | Functions
clang::clone_detection Namespace Reference

Classes

class  StmtDataCollector
 Collects the data of a single Stmt. More...
 

Functions

std::string getMacroStack (SourceLocation Loc, ASTContext &Context)
 Returns a string that represents all macro expansions that expanded into the given SourceLocation. More...
 

Function Documentation

std::string clang::clone_detection::getMacroStack ( SourceLocation  Loc,
ASTContext Context 
)

Returns a string that represents all macro expansions that expanded into the given SourceLocation.

If 'getMacroStack(A) == getMacroStack(B)' is true, then the SourceLocations A and B are expanded from the same macros in the same order.

Definition at line 106 of file CloneDetection.cpp.

References clang::SourceManager::getImmediateMacroCallerLoc(), clang::ASTContext::getSourceManager(), clang::SourceLocation::isMacroID(), printMacroName(), and SM.

Referenced by clang::MinComplexityConstraint::calculateStmtComplexity().