clang 20.0.0git
Public Member Functions | List of all members
clang::ento::FindUninitializedFields Class Reference

Searches for and stores uninitialized fields in a non-union object. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h"

Public Member Functions

 FindUninitializedFields (ProgramStateRef State, const TypedValueRegion *const R, const UninitObjCheckerOptions &Opts)
 Constructs the FindUninitializedField object, searches for and stores uninitialized fields in R.
 
std::pair< ProgramStateRef, const UninitFieldMap & > getResults ()
 Returns with the modified state and a map of (uninitialized region, note message) pairs.
 
bool isAnyFieldInitialized ()
 Returns whether the analyzed region contains at least one initialized field.
 

Detailed Description

Searches for and stores uninitialized fields in a non-union object.

Definition at line 197 of file UninitializedObject.h.

Constructor & Destructor Documentation

◆ FindUninitializedFields()

FindUninitializedFields::FindUninitializedFields ( ProgramStateRef  State,
const TypedValueRegion *const  R,
const UninitObjCheckerOptions Opts 
)

Constructs the FindUninitializedField object, searches for and stores uninitialized fields in R.

Definition at line 224 of file UninitializedObjectChecker.cpp.

References isAnyFieldInitialized(), and clang::ento::UninitObjCheckerOptions::IsPedantic.

Member Function Documentation

◆ getResults()

std::pair< ProgramStateRef, const UninitFieldMap & > clang::ento::FindUninitializedFields::getResults ( )
inline

Returns with the modified state and a map of (uninitialized region, note message) pairs.

Definition at line 227 of file UninitializedObject.h.

◆ isAnyFieldInitialized()

bool clang::ento::FindUninitializedFields::isAnyFieldInitialized ( )
inline

Returns whether the analyzed region contains at least one initialized field.

Note that this includes subfields as well, not just direct ones, and will return false if an uninitialized pointee is found with CheckPointeeInitialization enabled.

Definition at line 235 of file UninitializedObject.h.

Referenced by FindUninitializedFields().


The documentation for this class was generated from the following files: