clang
9.0.0
|
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.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/CheckerHelpers.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Path.h"
Go to the source code of this file.
Macros | |
#define | REGISTER_CHECKER(name, trackingRequired) |
Enumerations | |
enum | ErrorKind : int |
Functions | |
REGISTER_MAP_WITH_PROGRAMSTATE (NullabilityMap, const MemRegion *, NullabilityState) enum class NullConstraint | |
static NullConstraint | getNullConstraint (DefinedOrUnknownSVal Val, ProgramStateRef State) |
static bool | checkValueAtLValForInvariantViolation (ProgramStateRef State, SVal LV, QualType T) |
Returns true when the value stored at the given location has been constrained to null after being passed through an object of nonnnull type. More... | |
static bool | checkParamsForPreconditionViolation (ArrayRef< ParmVarDecl *> Params, ProgramStateRef State, const LocationContext *LocCtxt) |
static bool | checkSelfIvarsForInvariantViolation (ProgramStateRef State, const LocationContext *LocCtxt) |
static bool | checkInvariantViolation (ProgramStateRef State, ExplodedNode *N, CheckerContext &C) |
static const Expr * | lookThroughImplicitCasts (const Expr *E) |
Find the outermost subexpression of E that is not an implicit cast. More... | |
static Nullability | getReceiverNullability (const ObjCMethodCall &M, ProgramStateRef State) |
static const Expr * | matchValueExprForBind (const Stmt *S) |
For a given statement performing a bind, attempt to syntactically match the expression resulting in the bound value. More... | |
static bool | isARCNilInitializedLocal (CheckerContext &C, const Stmt *S) |
Returns true if. More... | |
#define REGISTER_CHECKER | ( | name, | |
trackingRequired | |||
) |
Definition at line 1202 of file NullabilityChecker.cpp.
|
strong |
Definition at line 70 of file NullabilityChecker.cpp.
|
static |
Definition at line 406 of file NullabilityChecker.cpp.
References checkParamsForPreconditionViolation(), checkSelfIvarsForInvariantViolation(), clang::tooling::Filter, clang::LocationContext::getDecl(), clang::ento::Nullable, and State.
|
static |
Definition at line 359 of file NullabilityChecker.cpp.
References checkValueAtLValForInvariantViolation().
Referenced by checkInvariantViolation().
|
static |
Definition at line 376 of file NullabilityChecker.cpp.
References checkValueAtLValForInvariantViolation(), clang::LocationContext::getDecl(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::LocationContext::getSelfDecl(), clang::ValueDecl::getType(), and clang::ObjCInterfaceDecl::ivars().
Referenced by checkInvariantViolation().
|
static |
Returns true when the value stored at the given location has been constrained to null after being passed through an object of nonnnull type.
Definition at line 333 of file NullabilityChecker.cpp.
References clang::ento::getNullabilityAnnotation(), getNullConstraint(), and clang::ento::Nonnull.
Referenced by checkParamsForPreconditionViolation(), and checkSelfIvarsForInvariantViolation().
|
static |
Definition at line 262 of file NullabilityChecker.cpp.
References State, and clang::prec::Unknown.
Referenced by checkValueAtLValForInvariantViolation(), and getReceiverNullability().
|
static |
Definition at line 786 of file NullabilityChecker.cpp.
References clang::ObjCMethodCall::getDecl(), getNullConstraint(), clang::ObjCMethodCall::getReceiverSVal(), clang::Type::isAnyPointerType(), clang::ObjCMethodCall::isReceiverSelfOrSuper(), clang::ento::Nonnull, State, and clang::ento::Unspecified.
Returns true if.
S | is a DeclStmt for a local variable that ObjC automated reference counting initialized with zero. |
Definition at line 1013 of file NullabilityChecker.cpp.
Find the outermost subexpression of E that is not an implicit cast.
This looks through the implicit casts to _Nonnull that ARC adds to return expressions of ObjC types when the return type of the function or method is non-null but the express is not.
Definition at line 512 of file NullabilityChecker.cpp.
For a given statement performing a bind, attempt to syntactically match the expression resulting in the bound value.
Definition at line 989 of file NullabilityChecker.cpp.
REGISTER_MAP_WITH_PROGRAMSTATE | ( | NullabilityMap | , |
const MemRegion * | , | ||
NullabilityState | |||
) |
Definition at line 231 of file NullabilityChecker.cpp.