clang API Documentation
#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"
Go to the source code of this file.
static bool compare | ( | const PathDiagnostic & | X, |
const PathDiagnostic & | Y | ||
) | [static] |
Definition at line 379 of file PathDiagnostic.cpp.
References clang::ento::PathDiagnosticLocation::asLocation(), comparePath(), clang::ento::PathDiagnostic::getBugType(), clang::ento::PathDiagnostic::getCategory(), clang::ento::PathDiagnostic::getDeclWithIssue(), clang::Decl::getLocation(), clang::ento::PathDiagnostic::getLocation(), clang::FullSourceLoc::getManager(), clang::ento::PathDiagnostic::getShortDescription(), clang::ento::PathDiagnostic::getVerboseDescription(), clang::SourceManager::isBeforeInTranslationUnit(), clang::FullSourceLoc::isBeforeInTranslationUnitThan(), clang::ento::PathDiagnostic::meta_begin(), clang::ento::PathDiagnostic::meta_end(), clang::ento::PathDiagnostic::path, and SM.
Referenced by clang::ento::PathDiagnosticConsumer::FlushDiagnostics().
static Optional<bool> compareCall | ( | const PathDiagnosticCallPiece & | X, |
const PathDiagnosticCallPiece & | Y | ||
) | [static] |
Definition at line 302 of file PathDiagnostic.cpp.
References clang::ento::PathDiagnosticLocation::asLocation(), clang::ento::PathDiagnosticCallPiece::callEnter, clang::ento::PathDiagnosticCallPiece::callEnterWithin, clang::ento::PathDiagnosticCallPiece::callReturn, comparePath(), clang::FullSourceLoc::isBeforeInTranslationUnitThan(), and clang::ento::PathDiagnosticCallPiece::path.
Referenced by comparePiece().
static Optional<bool> compareControlFlow | ( | const PathDiagnosticControlFlowPiece & | X, |
const PathDiagnosticControlFlowPiece & | Y | ||
) | [static] |
Definition at line 284 of file PathDiagnostic.cpp.
References clang::ento::PathDiagnosticLocation::asLocation(), clang::ento::PathDiagnosticControlFlowPiece::getEndLocation(), clang::ento::PathDiagnosticControlFlowPiece::getStartLocation(), and clang::FullSourceLoc::isBeforeInTranslationUnitThan().
Referenced by comparePiece().
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] |
Definition at line 319 of file PathDiagnostic.cpp.
References clang::ento::PathDiagnosticLocation::asLocation(), clang::ento::PathDiagnosticPiece::Call, compareCall(), compareControlFlow(), compareMacro(), clang::ento::PathDiagnosticPiece::ControlFlow, clang::ento::PathDiagnosticPiece::Event, clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::ento::PathDiagnosticPiece::getKind(), clang::ento::PathDiagnosticPiece::getLocation(), clang::FullSourceLoc::getManager(), clang::ento::PathDiagnosticPiece::getRanges(), clang::ento::PathDiagnosticPiece::getString(), clang::SourceManager::isBeforeInTranslationUnit(), clang::FullSourceLoc::isBeforeInTranslationUnitThan(), clang::ento::PathDiagnosticPiece::Macro, and SM.
Referenced by comparePath().
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] |
Definition at line 917 of file PathDiagnostic.cpp.
References describeClass().
Referenced by clang::ento::PathDiagnosticCallPiece::getCallEnterEvent(), clang::ento::PathDiagnosticCallPiece::getCallEnterWithinCallerEvent(), and clang::ento::PathDiagnosticCallPiece::getCallExitEvent().
static PathDiagnosticCallPiece* getFirstStackedCallToHeaderFile | ( | PathDiagnosticCallPiece * | CP, |
const SourceManager & | SMgr | ||
) | [static] |
Definition at line 126 of file PathDiagnostic.cpp.
References clang::ento::PathDiagnosticLocation::asLocation(), clang::ento::PathDiagnosticCallPiece::callEnter, clang::ento::PathDiagnosticCallPiece::callEnterWithin, clang::SourceManager::isInMainFile(), clang::SourceLocation::isMacroID(), and clang::ento::PathDiagnosticCallPiece::path.
Referenced by clang::ento::PathDiagnostic::resetDiagnosticLocationToMainFile().
static PathDiagnosticLocation getLocationForCaller | ( | const StackFrameContext * | SFC, |
const LocationContext * | CallerCtx, | ||
const SourceManager & | SM | ||
) | [static] |
Definition at line 540 of file PathDiagnostic.cpp.
References clang::CFGElement::AutomaticObjectDtor, clang::CFGElement::BaseDtor, clang::CFGElement::castAs(), clang::serialized_diags::create(), clang::ento::PathDiagnosticLocation::createEnd(), clang::CFGElement::DeleteDtor, clang::LocationContext::getAnalysisDeclContext(), clang::AnalysisDeclContext::getBody(), clang::StackFrameContext::getCallSiteBlock(), clang::AnalysisDeclContext::getDecl(), clang::CFGDeleteDtor::getDeleteExpr(), clang::StackFrameContext::getIndex(), clang::CXXCtorInitializer::getInit(), clang::CFGInitializer::getInitializer(), clang::CFGElement::getKind(), clang::CFGStmt::getStmt(), clang::CFGAutomaticObjDtor::getTriggerStmt(), clang::CFGElement::Initializer, clang::CFGElement::MemberDtor, clang::CFGElement::NewAllocator, SM, clang::CFGElement::Statement, and clang::CFGElement::TemporaryDtor.
Referenced by clang::ento::PathDiagnosticCallPiece::construct(), clang::ento::PathDiagnosticLocation::create(), and clang::ento::PathDiagnosticCallPiece::setCallee().
static SourceLocation getValidSourceLocation | ( | const Stmt * | S, |
LocationOrAnalysisDeclContext | LAC, | ||
bool | UseEnd = false |
||
) | [static] |
Definition at line 496 of file PathDiagnostic.cpp.
References clang::LocationContext::getAnalysisDeclContext(), clang::AnalysisDeclContext::getBody(), clang::AnalysisDeclContext::getDecl(), clang::Decl::getLocEnd(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), clang::AnalysisDeclContext::getParentMap(), clang::SourceLocation::isValid(), and S.
Referenced by clang::ento::PathDiagnosticLocation::createBegin(), clang::ento::PathDiagnosticLocation::createEnd(), and clang::ento::PathDiagnosticLocation::createEndOfPath().
static StringRef StripTrailingDots | ( | StringRef | s | ) | [static] |
Definition at line 43 of file PathDiagnostic.cpp.