clang: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp File Reference (original) (raw)
Go to the source code of this file.
Functions | |
---|---|
static const Expr * | peelOffPointerArithmetic (const BinaryOperator *B) |
static const Expr * | peelOffOuterExpr (const Expr *Ex, const ExplodedNode *N) |
static const VarDecl * | getVarDeclForExpression (const Expr *E) |
static const MemRegion * | getLocationRegionIfReference (const Expr *E, const ExplodedNode *N, bool LookingForReference=true) |
static bool | hasVisibleUpdate (const ExplodedNode *LeftNode, SVal LeftVal, const ExplodedNode *RightNode, SVal RightVal) |
Comparing internal representations of symbolic values (via SVal::operator==()) is a valid way to check if the value was updated, unless it's a LazyCompoundVal that may have a different internal representation every time it is loaded from the state. | |
static std::optional< SVal > | getSValForVar (const Expr *CondVarExpr, const ExplodedNode *N) |
static std::optional< const llvm::APSInt * > | getConcreteIntegerValue (const Expr *CondVarExpr, const ExplodedNode *N) |
static bool | isVarAnInterestingCondition (const Expr *CondVarExpr, const ExplodedNode *N, const PathSensitiveBugReport *B) |
static bool | isInterestingExpr (const Expr *E, const ExplodedNode *N, const PathSensitiveBugReport *B) |
static StringRef | getMacroName (SourceLocation Loc, BugReporterContext &BRC) |
static bool | isFunctionMacroExpansion (SourceLocation Loc, const SourceManager &SM) |
static bool | wasRegionOfInterestModifiedAt (const SubRegion *RegionOfInterest, const ExplodedNode *N, SVal ValueAfter) |
static const ExplodedNode * | getMatchingCallExitEnd (const ExplodedNode *N) |
static bool | potentiallyWritesIntoIvar (const Decl *Parent, const ObjCIvarDecl *Ivar) |
static bool | isPointerToConst (QualType Ty) |
static bool | isInitializationOfVar (const ExplodedNode *N, const VarRegion *VR) |
Returns true if N represents the DeclStmt declaring and initializing VR. | |
static bool | isObjCPointer (const MemRegion *R) |
static bool | isObjCPointer (const ValueDecl *D) |
static void | showBRDiagnostics (llvm::raw_svector_ostream &OS, StoreInfo SI) |
Show diagnostics for initializing or declaring a region R with a bad value. | |
static void | showBRParamDiagnostics (llvm::raw_svector_ostream &OS, StoreInfo SI) |
Display diagnostics for passing bad region as a parameter. | |
static void | showBRDefaultDiagnostics (llvm::raw_svector_ostream &OS, StoreInfo SI) |
Show default diagnostics for storing bad region. | |
static bool | isTrivialCopyOrMoveCtor (const CXXConstructExpr *CE) |
static const Expr * | tryExtractInitializerFromList (const InitListExpr *ILE, const MemRegion *R) |
static std::shared_ptr< PathDiagnosticEventPiece > | constructDebugPieceForTrackedCondition (const Expr *Cond, const ExplodedNode *N, BugReporterContext &BRC) |
static bool | isAssertlikeBlock (const CFGBlock *B, ASTContext &Context) |
static const ExplodedNode * | findNodeForExpression (const ExplodedNode *N, const Expr *Inner) |
Find the ExplodedNode where the lvalue (the value of 'Ex') was computed. | |
◆ constructDebugPieceForTrackedCondition()
Definition at line 1932 of file BugReporterVisitors.cpp.
References clang::AnalyzerOptions::AnalysisDiagOpt, clang::ento::PathDiagnosticLocation::createBegin(), clang::ento::BugReporterContext::getAnalyzerOptions(), clang::ento::BugReporterContext::getASTContext(), clang::ASTContext::getLangOpts(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::BugReporterContext::getSourceManager(), clang::Stmt::getSourceRange(), clang::Lexer::getSourceText(), clang::CharSourceRange::getTokenRange(), and clang::PD_NONE.
◆ findNodeForExpression()
◆ getConcreteIntegerValue()
◆ getLocationRegionIfReference()
◆ getMacroName()
◆ getMatchingCallExitEnd()
◆ getSValForVar()
static std::optional< SVal > getSValForVar ( const Expr * CondVarExpr, const ExplodedNode * N ) | static |
---|
◆ getVarDeclForExpression()
static const VarDecl * getVarDeclForExpression ( const Expr * E) | static |
---|
◆ hasVisibleUpdate()
◆ isAssertlikeBlock()
◆ isFunctionMacroExpansion()
◆ isInitializationOfVar()
◆ isInterestingExpr()
◆ isObjCPointer() [1/2]
◆ isObjCPointer() [2/2]
◆ isPointerToConst()
◆ isTrivialCopyOrMoveCtor()
◆ isVarAnInterestingCondition()
◆ peelOffOuterExpr()
◆ peelOffPointerArithmetic()
◆ potentiallyWritesIntoIvar()
◆ showBRDefaultDiagnostics()
static void showBRDefaultDiagnostics ( llvm::raw_svector_ostream & OS, StoreInfo SI ) | static |
---|
◆ showBRDiagnostics()
static void showBRDiagnostics ( llvm::raw_svector_ostream & OS, StoreInfo SI ) | static |
---|
Show diagnostics for initializing or declaring a region R
with a bad value.
Definition at line 1223 of file BugReporterVisitors.cpp.
References clang::ento::bugreporter::StoreInfo::BlockCapture, clang::ento::MemRegion::canPrintPretty(), clang::ento::bugreporter::StoreInfo::Dest, clang::ento::SVal::getAs(), clang::ento::ExplodedNode::getLocationAs(), clang::StmtPoint::getStmt(), clang::ento::bugreporter::StoreInfo::Initialization, isObjCPointer(), clang::ento::SVal::isUndef(), clang::ento::bugreporter::StoreInfo::Origin, clang::ento::OS, clang::ento::MemRegion::printPretty(), clang::ento::bugreporter::StoreInfo::StoreKind, clang::ento::bugreporter::StoreInfo::StoreSite, and clang::ento::bugreporter::StoreInfo::Value.
◆ showBRParamDiagnostics()
static void showBRParamDiagnostics ( llvm::raw_svector_ostream & OS, StoreInfo SI ) | static |
---|
Display diagnostics for passing bad region as a parameter.
Definition at line 1280 of file BugReporterVisitors.cpp.
References clang::ento::MemRegion::canPrintPretty(), D, clang::ento::bugreporter::StoreInfo::Dest, clang::ento::SVal::getAs(), isObjCPointer(), clang::ento::SVal::isUndef(), clang::ObjCSelf, clang::ento::bugreporter::StoreInfo::Origin, clang::ento::OS, clang::ento::MemRegion::printPretty(), and clang::ento::bugreporter::StoreInfo::Value.
◆ tryExtractInitializerFromList()
◆ wasRegionOfInterestModifiedAt()
◆ WillBeUsedForACondition
llvm::StringLiteral WillBeUsedForACondition | static |
---|