clang 20.0.0git
Functions
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>

Go to the source code of this file.

Functions

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

◆ compareCall()

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

◆ compareControlFlow()

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

◆ compareCrossTUSourceLocs()

static bool compareCrossTUSourceLocs ( FullSourceLoc  XL,
FullSourceLoc  YL 
)
static

◆ compareMacro()

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

Definition at line 243 of file PathDiagnostic.cpp.

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

Referenced by comparePiece().

◆ comparePath()

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

Definition at line 311 of file PathDiagnostic.cpp.

References b, comparePiece(), and X.

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

◆ comparePiece()

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

◆ compute_path_size()

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

◆ describeClass()

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

Definition at line 923 of file PathDiagnostic.cpp.

References D, describeTemplateParameters(), clang::Decl::getLangOpts(), and clang::T.

Referenced by describeCodeDecl().

◆ 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

◆ getLocationForCaller()

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

◆ StripTrailingDots()

static StringRef StripTrailingDots ( StringRef  s)
static

Definition at line 53 of file PathDiagnostic.cpp.

References s.