clang  6.0.0svn
Functions
PathDiagnostic.cpp File Reference
#include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ParentMap.h"
#include "clang/AST/StmtCXX.h"
#include "clang/Basic/SourceManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for PathDiagnostic.cpp:

Go to the source code of this file.

Functions

static StringRef StripTrailingDots (StringRef s)
 
static PathDiagnosticCallPiecegetFirstStackedCallToHeaderFile (PathDiagnosticCallPiece *CP, const SourceManager &SMgr)
 
static Optional< boolcomparePath (const PathPieces &X, const PathPieces &Y)
 
static Optional< boolcompareControlFlow (const PathDiagnosticControlFlowPiece &X, const PathDiagnosticControlFlowPiece &Y)
 
static Optional< boolcompareMacro (const PathDiagnosticMacroPiece &X, const PathDiagnosticMacroPiece &Y)
 
static Optional< boolcompareCall (const PathDiagnosticCallPiece &X, const PathDiagnosticCallPiece &Y)
 
static Optional< boolcomparePiece (const PathDiagnosticPiece &X, const PathDiagnosticPiece &Y)
 
static bool compare (const PathDiagnostic &X, const PathDiagnostic &Y)
 
static SourceLocation getValidSourceLocation (const Stmt *S, LocationOrAnalysisDeclContext LAC, bool UseEnd=false)
 
static PathDiagnosticLocation getLocationForCaller (const StackFrameContext *SFC, const LocationContext *CallerCtx, const SourceManager &SM)
 
static const LocationContextfindTopAutosynthesizedParentContext (const LocationContext *LC)
 
static void describeClass (raw_ostream &Out, const CXXRecordDecl *D, StringRef Prefix=StringRef())
 
static bool describeCodeDecl (raw_ostream &Out, const Decl *D, bool ExtendedDescription, StringRef Prefix=StringRef())
 
static void compute_path_size (const PathPieces &pieces, unsigned &size)
 

Function Documentation

◆ compare()

static bool compare ( const PathDiagnostic X,
const PathDiagnostic Y 
)
static

◆ compareCall()

static Optional<bool> compareCall ( const PathDiagnosticCallPiece X,
const PathDiagnosticCallPiece Y 
)
static

◆ compareControlFlow()

static Optional<bool> compareControlFlow ( const PathDiagnosticControlFlowPiece X,
const PathDiagnosticControlFlowPiece Y 
)
static

◆ compareMacro()

static Optional<bool> compareMacro ( const PathDiagnosticMacroPiece X,
const PathDiagnosticMacroPiece Y 
)
static

Definition at line 301 of file PathDiagnostic.cpp.

References comparePath(), and clang::ento::PathDiagnosticMacroPiece::subPieces.

Referenced by comparePiece().

◆ comparePath()

static Optional< bool > comparePath ( const PathPieces X,
const PathPieces Y 
)
static

Definition at line 368 of file PathDiagnostic.cpp.

References comparePiece().

Referenced by compare(), compareCall(), and compareMacro().

◆ comparePiece()

static Optional<bool> comparePiece ( const PathDiagnosticPiece X,
const PathDiagnosticPiece Y 
)
static

◆ compute_path_size()

static void compute_path_size ( const PathPieces pieces,
unsigned &  size 
)
static

Definition at line 1088 of file PathDiagnostic.cpp.

Referenced by clang::ento::PathDiagnostic::full_size().

◆ describeClass()

static void describeClass ( raw_ostream &  Out,
const CXXRecordDecl D,
StringRef  Prefix = StringRef() 
)
inlinestatic

Definition at line 954 of file PathDiagnostic.cpp.

References clang::NamedDecl::getIdentifier().

Referenced by describeCodeDecl().

◆ describeCodeDecl()

static bool describeCodeDecl ( raw_ostream &  Out,
const Decl D,
bool  ExtendedDescription,
StringRef  Prefix = StringRef() 
)
static

◆ findTopAutosynthesizedParentContext()

static const LocationContext* findTopAutosynthesizedParentContext ( const LocationContext LC)
static

◆ getFirstStackedCallToHeaderFile()

static PathDiagnosticCallPiece* getFirstStackedCallToHeaderFile ( PathDiagnosticCallPiece CP,
const SourceManager SMgr 
)
static

◆ getLocationForCaller()

static PathDiagnosticLocation getLocationForCaller ( const StackFrameContext SFC,
const LocationContext CallerCtx,
const SourceManager SM 
)
static

◆ getValidSourceLocation()

static SourceLocation getValidSourceLocation ( const Stmt S,
LocationOrAnalysisDeclContext  LAC,
bool  UseEnd = false 
)
static

Definition at line 505 of file PathDiagnostic.cpp.

◆ StripTrailingDots()

static StringRef StripTrailingDots ( StringRef  s)
static

Definition at line 42 of file PathDiagnostic.cpp.