|
clang
5.0.0
|
#include "AllocationDiagnostics.h"#include "ClangSACheckers.h"#include "SelectorExtras.h"#include "clang/AST/Attr.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclObjC.h"#include "clang/AST/ParentMap.h"#include "clang/Analysis/DomainSpecific/CocoaConventions.h"#include "clang/Basic/LangOptions.h"#include "clang/Basic/SourceManager.h"#include "clang/StaticAnalyzer/Checkers/ObjCRetainCount.h"#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"#include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.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/ProgramStateTrait.h"#include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/FoldingSet.h"#include "llvm/ADT/ImmutableList.h"#include "llvm/ADT/ImmutableMap.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/StringExtras.h"#include <cstdarg>#include <utility>Go to the source code of this file.
Classes | |
| struct | llvm::FoldingSetTrait< ArgEffect > |
| struct | llvm::FoldingSetTrait< RetEffect > |
| struct | llvm::DenseMapInfo< ObjCSummaryKey > |
Namespaces | |
| llvm | |
| DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterators. | |
| clang | |
| /file This file defines classes for searching and anlyzing source code clones. | |
| clang::ento | |
| clang::ento::objc_retain | |
Macros | |
| #define | createCallEffect(D, KIND) |
Typedefs | |
| typedef llvm::ImmutableMap < unsigned, ArgEffect > | ArgEffects |
| ArgEffects summarizes the effects of a function/method call on all of its arguments. More... | |
Functions | |
| static const RefVal * | getRefBinding (ProgramStateRef State, SymbolRef Sym) |
| static ProgramStateRef | setRefBinding (ProgramStateRef State, SymbolRef Sym, RefVal Val) |
| static ProgramStateRef | removeRefBinding (ProgramStateRef State, SymbolRef Sym) |
| static bool | isRetain (const FunctionDecl *FD, StringRef FName) |
| static bool | isRelease (const FunctionDecl *FD, StringRef FName) |
| static bool | isAutorelease (const FunctionDecl *FD, StringRef FName) |
| static bool | isMakeCollectable (const FunctionDecl *FD, StringRef FName) |
| static ArgEffect | getStopTrackingHardEquivalent (ArgEffect E) |
| static bool | hasRCAnnotation (const Decl *D, StringRef rcAnnotation) |
| Returns true if the declaration 'D' is annotated with 'rcAnnotation'. More... | |
| static bool | isTrustedReferenceCountImplementation (const FunctionDecl *FD) |
| Returns true if the function declaration 'FD' contains 'rc_ownership_trusted_implementation' annotate attribute. More... | |
| static bool | isNumericLiteralExpression (const Expr *E) |
| static bool | isSynthesizedAccessor (const StackFrameContext *SFC) |
| Returns true if this stack frame is for an Objective-C method that is a property getter or setter whose body has been synthesized by the analyzer. More... | |
| static AllocationInfo | GetAllocationSite (ProgramStateManager &StateMgr, const ExplodedNode *N, SymbolRef Sym) |
| static QualType | GetReturnType (const Expr *RetE, ASTContext &Ctx) |
| GetReturnType - Used to get the return type of a message expression or function call with the intention of affixing that type to a tracked symbol. More... | |
| static ProgramStateRef | updateOutParameter (ProgramStateRef State, SVal ArgVal, ArgEffect Effect) |
| #define createCallEffect | ( | D, | |
| KIND | |||
| ) |
Definition at line 4039 of file RetainCountChecker.cpp.
Referenced by clang::ento::objc_retain::CallEffects::getEffect().
| typedef llvm::ImmutableMap<unsigned,ArgEffect> ArgEffects |
ArgEffects summarizes the effects of a function/method call on all of its arguments.
Definition at line 73 of file RetainCountChecker.cpp.
|
static |
Definition at line 2247 of file RetainCountChecker.cpp.
References clang::ento::MemRegion::getAs(), clang::ProgramPoint::getAs(), clang::ento::SVal::getAsSymbol(), clang::ento::MemRegion::getBaseRegion(), clang::LocationContext::getCurrentStackFrame(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), getRefBinding(), clang::ento::StoreManager::FindUniqueBinding::getRegion(), clang::ento::VarRegion::getStackFrame(), clang::ento::ExplodedNode::getState(), clang::LocationContext::isParentOf(), clang::ento::ProgramStateManager::iterBindings(), clang::OMF_alloc, clang::OMF_init, clang::ento::ExplodedNode::pred_begin(), and clang::ento::ExplodedNode::pred_empty().
|
inlinestatic |
Definition at line 365 of file RetainCountChecker.cpp.
Referenced by GetAllocationSite().
|
static |
GetReturnType - Used to get the return type of a message expression or function call with the intention of affixing that type to a tracked symbol.
While the return type can be queried directly from RetEx, when invoking class methods we augment to the return type to be that of a pointer to the class (as opposed it just being id).
more specific than id.
Definition at line 2938 of file RetainCountChecker.cpp.
References clang::Type::getAs(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCObjectPointerType(), clang::Expr::getType(), clang::ObjCObjectPointerType::isObjCClassType(), clang::ObjCObjectPointerType::isObjCIdType(), and clang::ObjCObjectPointerType::isObjCQualifiedIdType().
Definition at line 902 of file RetainCountChecker.cpp.
References clang::ento::objc_retain::Autorelease, clang::ento::objc_retain::Dealloc, clang::ento::objc_retain::DecRef, clang::ento::objc_retain::DecRefAndStopTrackingHard, clang::ento::objc_retain::DecRefBridgedTransferred, clang::ento::objc_retain::DecRefMsg, clang::ento::objc_retain::DecRefMsgAndStopTrackingHard, clang::ento::objc_retain::DoNothing, clang::ento::objc_retain::IncRef, clang::ento::objc_retain::IncRefMsg, clang::ento::objc_retain::MakeCollectable, clang::ento::objc_retain::MayEscape, clang::ento::objc_retain::RetainedOutParameter, clang::ento::objc_retain::StopTracking, clang::ento::objc_retain::StopTrackingHard, and clang::ento::objc_retain::UnretainedOutParameter.
Returns true if the declaration 'D' is annotated with 'rcAnnotation'.
Definition at line 1308 of file RetainCountChecker.cpp.
References clang::Decl::specific_attrs().
Referenced by isTrustedReferenceCountImplementation().
|
static |
Definition at line 892 of file RetainCountChecker.cpp.
|
static |
Definition at line 896 of file RetainCountChecker.cpp.
Definition at line 1893 of file RetainCountChecker.cpp.
References E.
|
static |
Definition at line 888 of file RetainCountChecker.cpp.
|
static |
Definition at line 884 of file RetainCountChecker.cpp.
|
static |
Returns true if this stack frame is for an Objective-C method that is a property getter or setter whose body has been synthesized by the analyzer.
Definition at line 1904 of file RetainCountChecker.cpp.
References clang::LocationContext::getAnalysisDeclContext(), clang::LocationContext::getDecl(), clang::AnalysisDeclContext::isBodyAutosynthesized(), and clang::ObjCMethodDecl::isPropertyAccessor().
|
static |
Returns true if the function declaration 'FD' contains 'rc_ownership_trusted_implementation' annotate attribute.
Definition at line 1318 of file RetainCountChecker.cpp.
References hasRCAnnotation().
|
static |
Definition at line 375 of file RetainCountChecker.cpp.
|
inlinestatic |
Definition at line 370 of file RetainCountChecker.cpp.
Referenced by updateOutParameter().
|
static |
Definition at line 2998 of file RetainCountChecker.cpp.
References clang::ento::SVal::getAsLocSymbol(), clang::ento::SVal::getAsRegion(), clang::ento::coreFoundation::isCFObjectRef(), clang::ento::objc_retain::RetainedOutParameter, setRefBinding(), State, and clang::ento::objc_retain::UnretainedOutParameter.
1.8.6