clang  7.0.0svn
Functions
PathDiagnostic.cpp File Reference
#include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/ParentMap.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/ProgramPoint.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstring>
#include <memory>
#include <utility>
#include <vector>
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 compareCrossTUSourceLocs (FullSourceLoc XL, FullSourceLoc YL)
 
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 describeTemplateParameters (raw_ostream &Out, const ArrayRef< TemplateArgument > TAList, const LangOptions &LO, StringRef Prefix=StringRef(), StringRef Postfix=StringRef())
 
static void describeTemplateParameter (raw_ostream &Out, const TemplateArgument &TArg, const LangOptions &LO)
 
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

◆ compareCrossTUSourceLocs()

static bool compareCrossTUSourceLocs ( FullSourceLoc  XL,
FullSourceLoc  YL 
)
static

◆ compareMacro()

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

Definition at line 319 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 386 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 1185 of file PathDiagnostic.cpp.

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

◆ describeClass()

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

◆ describeCodeDecl()

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

◆ describeTemplateParameter()

static void describeTemplateParameter ( raw_ostream &  Out,
const TemplateArgument TArg,
const LangOptions LO 
)
static

◆ describeTemplateParameters()

static void describeTemplateParameters ( raw_ostream &  Out,
const ArrayRef< TemplateArgument TAList,
const LangOptions LO,
StringRef  Prefix = StringRef(),
StringRef  Postfix = 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 536 of file PathDiagnostic.cpp.

◆ StripTrailingDots()

static StringRef StripTrailingDots ( StringRef  s)
static

Definition at line 68 of file PathDiagnostic.cpp.