clang  17.0.0git
PathDiagnostic.cpp File Reference
#include "clang/Analysis/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/PrettyPrinter.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 "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FoldingSet.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 <optional>
#include <utility>
#include <vector>
Include dependency graph for PathDiagnostic.cpp:

Go to the source code of this file.


static StringRef StripTrailingDots (StringRef s)
static std::optional< boolcomparePath (const PathPieces &X, const PathPieces &Y)
static std::optional< boolcompareControlFlow (const PathDiagnosticControlFlowPiece &X, const PathDiagnosticControlFlowPiece &Y)
static std::optional< boolcompareMacro (const PathDiagnosticMacroPiece &X, const PathDiagnosticMacroPiece &Y)
static std::optional< boolcompareCall (const PathDiagnosticCallPiece &X, const PathDiagnosticCallPiece &Y)
static std::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 PathDiagnosticLocation getLocationForCaller (const StackFrameContext *SFC, const LocationContext *CallerCtx, const SourceManager &SM)
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 

◆ compareCall()

static std::optional<bool> compareCall ( const PathDiagnosticCallPiece X,
const PathDiagnosticCallPiece Y 

◆ compareControlFlow()

static std::optional<bool> compareControlFlow ( const PathDiagnosticControlFlowPiece X,
const PathDiagnosticControlFlowPiece Y 

◆ compareCrossTUSourceLocs()

static bool compareCrossTUSourceLocs ( FullSourceLoc  XL,
FullSourceLoc  YL 

◆ compareMacro()

static std::optional<bool> compareMacro ( const PathDiagnosticMacroPiece X,
const PathDiagnosticMacroPiece Y 

◆ comparePath()

static std::optional< bool > comparePath ( const PathPieces X,
const PathPieces Y 

Definition at line 313 of file PathDiagnostic.cpp.

References b, comparePiece(), and clang::tooling::X().

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

◆ comparePiece()

static std::optional<bool> comparePiece ( const PathDiagnosticPiece X,
const PathDiagnosticPiece Y 

◆ compute_path_size()

static void compute_path_size ( const PathPieces pieces,
unsigned size 

Definition at line 1065 of file PathDiagnostic.cpp.

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

◆ describeClass()

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

Definition at line 921 of file PathDiagnostic.cpp.

◆ describeCodeDecl()

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

Definition at line 933 of file PathDiagnostic.cpp.

◆ describeTemplateParameter()

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

Definition at line 894 of file PathDiagnostic.cpp.

◆ describeTemplateParameters()

static void describeTemplateParameters ( raw_ostream &  Out,
const ArrayRef< TemplateArgument TAList,
const LangOptions LO,
StringRef  Prefix = StringRef(),
StringRef  Postfix = StringRef() 

Definition at line 905 of file PathDiagnostic.cpp.

◆ getLocationForCaller()

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

◆ StripTrailingDots()

static StringRef StripTrailingDots ( StringRef  s)

Definition at line 53 of file PathDiagnostic.cpp.

References s.