clang: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp File Reference (original) (raw)

Go to the source code of this file.

Functions
static std::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.
static bool isVoidPointer (QualType T)
Returns whether T can be (transitively) dereferenced to a void pointer type (void*, void**, ...).

dereference()

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 std::nullopt.

Definition at line 221 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(), and V.

isVoidPointer()