clang API Documentation

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 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

static bool compare ( const PathDiagnostic X,
const PathDiagnostic Y 
) [static]
static Optional<bool> compareCall ( const PathDiagnosticCallPiece X,
const PathDiagnosticCallPiece Y 
) [static]
static Optional<bool> compareControlFlow ( const PathDiagnosticControlFlowPiece X,
const PathDiagnosticControlFlowPiece Y 
) [static]
static Optional<bool> compareMacro ( const PathDiagnosticMacroPiece X,
const PathDiagnosticMacroPiece Y 
) [static]

Definition at line 297 of file PathDiagnostic.cpp.

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

Referenced by comparePiece().

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

Definition at line 363 of file PathDiagnostic.cpp.

References comparePiece().

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

static Optional<bool> comparePiece ( const PathDiagnosticPiece X,
const PathDiagnosticPiece Y 
) [static]
static void compute_path_size ( const PathPieces pieces,
unsigned size 
) [static]

Definition at line 1036 of file PathDiagnostic.cpp.

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

static void describeClass ( raw_ostream &  Out,
const CXXRecordDecl D,
StringRef  Prefix = StringRef() 
) [inline, static]

Definition at line 910 of file PathDiagnostic.cpp.

References clang::NamedDecl::getIdentifier().

Referenced by describeCodeDecl().

static bool describeCodeDecl ( raw_ostream &  Out,
const Decl D,
bool  ExtendedDescription,
StringRef  Prefix = StringRef() 
) [static]
static PathDiagnosticLocation getLocationForCaller ( const StackFrameContext SFC,
const LocationContext CallerCtx,
const SourceManager SM 
) [static]
static SourceLocation getValidSourceLocation ( const Stmt S,
LocationOrAnalysisDeclContext  LAC,
bool  UseEnd = false 
) [static]
static StringRef StripTrailingDots ( StringRef  s) [static]

Definition at line 43 of file PathDiagnostic.cpp.