clang 20.0.0git
|
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
Go to the source code of this file.
Functions | |
static bool | seenBefore (const Stmt *Parent, const Stmt *A, const Stmt *B) |
static void | emitDiagnostics (BoundNodes &Match, const Decl *D, BugReporter &BR, AnalysisManager &AM, const RunLoopAutoreleaseLeakChecker *Checker) |
static StatementMatcher | getRunLoopRunM (StatementMatcher Extra=anything()) |
static StatementMatcher | getOtherMessageSentM (StatementMatcher Extra=anything()) |
static void | checkTempObjectsInSamePool (const Decl *D, AnalysisManager &AM, BugReporter &BR, const RunLoopAutoreleaseLeakChecker *Chkr) |
static void | checkTempObjectsInNoPool (const Decl *D, AnalysisManager &AM, BugReporter &BR, const RunLoopAutoreleaseLeakChecker *Chkr) |
|
static |
Definition at line 174 of file RunLoopAutoreleaseLeakChecker.cpp.
References clang::ast_matchers::autoreleasePoolStmt, D, emitDiagnostics(), clang::ast_matchers::functionDecl, clang::ento::AnalysisManager::getASTContext(), getOtherMessageSentM(), getRunLoopRunM(), clang::ast_matchers::hasAncestor, clang::ast_matchers::hasDescendant, clang::ast_matchers::match(), and clang::ast_matchers::unless.
|
static |
Definition at line 155 of file RunLoopAutoreleaseLeakChecker.cpp.
References clang::ast_matchers::autoreleasePoolStmt, D, clang::ast_matchers::decl, emitDiagnostics(), clang::ento::AnalysisManager::getASTContext(), getOtherMessageSentM(), getRunLoopRunM(), clang::ast_matchers::hasAncestor, clang::ast_matchers::hasDescendant, and clang::ast_matchers::match().
|
static |
Definition at line 80 of file RunLoopAutoreleaseLeakChecker.cpp.
References clang::ento::PathDiagnosticLocation::createBegin(), D, clang::ento::BugReporter::EmitBasicReport(), clang::ento::AnalysisManager::getAnalysisDeclContext(), clang::Decl::getBody(), clang::AnalysisDeclContext::getDecl(), clang::ast_matchers::BoundNodes::getNodeAs(), clang::ento::BugReporter::getSourceManager(), clang::Decl::hasBody(), and seenBefore().
Referenced by checkTempObjectsInNoPool(), and checkTempObjectsInSamePool().
|
static |
Definition at line 147 of file RunLoopAutoreleaseLeakChecker.cpp.
References clang::ast_matchers::anyOf, clang::ast_matchers::objcMessageExpr, and clang::ast_matchers::unless.
Referenced by checkTempObjectsInNoPool(), and checkTempObjectsInSamePool().
|
static |
Definition at line 131 of file RunLoopAutoreleaseLeakChecker.cpp.
References clang::ast_matchers::anyOf, clang::ast_matchers::callExpr, clang::ast_matchers::functionDecl, clang::ast_matchers::hasName(), and clang::ast_matchers::objcMessageExpr.
Referenced by checkTempObjectsInNoPool(), and checkTempObjectsInSamePool().
A
occurs before B
in traversal of Parent
. Conceptually a very incomplete/unsound approximation of happens-before relationship (A is likely to be evaluated before B), but useful enough in this case. Definition at line 65 of file RunLoopAutoreleaseLeakChecker.cpp.
References clang::C, Parent, and seenBefore().
Referenced by emitDiagnostics(), and seenBefore().