clang
15.0.0git
|
#include "UninitializedObject.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicType.h"
Go to the source code of this file.
Classes | |
struct | DereferenceInfo |
Functions | |
static llvm::Optional< DereferenceInfo > | dereference (ProgramStateRef State, const FieldRegion *FR) |
Dereferences FR and returns with the pointee's region, and whether it needs to be casted back to it's location type. More... | |
static bool | isVoidPointer (QualType T) |
Returns whether T can be (transitively) dereferenced to a void pointer type (void*, void**, ...). More... | |
|
static |
Dereferences FR
and returns with the pointee's region, and whether it needs to be casted back to it's location type.
If for whatever reason dereferencing fails, returns with None.
Definition at line 222 of file UninitializedPointee.cpp.
References clang::ento::MemRegion::getAs(), clang::ento::FieldRegion::getDecl(), clang::ento::TypedValueRegion::getLocationType(), clang::Type::getPointeeType(), clang::ento::SubRegion::getSuperRegion(), clang::ValueDecl::getType(), clang::ento::isDereferencableType(), isVoidPointer(), State, and V.
Referenced by clang::interp::ByteCodeExprGen< Emitter >::VisitCastExpr().
Returns whether T
can be (transitively) dereferenced to a void pointer type (void*, void**, ...).
Definition at line 275 of file UninitializedPointee.cpp.
References clang::Type::getPointeeType(), clang::QualType::isNull(), and clang::Type::isVoidPointerType().
Referenced by dereference().