clang 8.0.0

Classes | Public Types | Public Member Functions | List of all members
clang::UninitUse Class Reference

A use of a variable, which might be uninitialized. More...

`#include "clang/Analysis/Analyses/UninitializedValues.h"`

## Classes
struct | Branch

## Public Types
enum | Kind { Maybe, Sometimes, AfterDecl, AfterCall, Always }
| The kind of uninitialized use. More...
using | branch_iterator = SmallVectorImpl< Branch >::const_iterator

## Public Member Functions
| UninitUse (const Expr *User, bool AlwaysUninit)
void | addUninitBranch (Branch B)
void | setUninitAfterCall ()
void | setUninitAfterDecl ()
const Expr * | getUser () const
| Get the expression containing the uninitialized use. More...
Kind | getKind () const
| Get the kind of uninitialized use. More...
branch_iterator | branch_begin () const
| Branches which inevitably result in the variable being used uninitialized. More...
branch_iterator | branch_end () const
bool | branch_empty () const

## Detailed Description

A use of a variable, which might be uninitialized.

Definition at line 31 of file UninitializedValues.h.

## Member Typedef Documentation

## ◆ branch_iterator

using clang::UninitUse::branch_iterator = SmallVectorImpl<Branch>::const_iterator

Definition at line 97 of file UninitializedValues.h.

## Member Enumeration Documentation

## ◆ Kind

enum clang::UninitUse::Kind

The kind of uninitialized use.

Enumerator
Maybe | The use might be uninitialized.
Sometimes | The use is uninitialized whenever a certain branch is taken.
AfterDecl | The use is uninitialized the first time it is reached after we reach the variable's declaration.
AfterCall | The use is uninitialized the first time it is reached after the function is called.
Always | The use is always uninitialized.

Definition at line 70 of file UninitializedValues.h.

## Constructor & Destructor Documentation

## ◆ UninitUse()

clang::UninitUse::UninitUse | ( | const Expr * | User,
|  | bool | AlwaysUninit
| ) |  |
| inline

Definition at line 56 of file UninitializedValues.h.

## Member Function Documentation

## ◆ addUninitBranch()

void clang::UninitUse::addUninitBranch | ( | Branch | B | ) |
| inline

Definition at line 59 of file UninitializedValues.h.

Referenced by isPointerToConst().

## ◆ branch_begin()

branch_iterator clang::UninitUse::branch_begin | ( |  | ) | const
| inline

Branches which inevitably result in the variable being used uninitialized.

Definition at line 100 of file UninitializedValues.h.

Referenced by DiagUninitUse().

## ◆ branch_empty()

bool clang::UninitUse::branch_empty | ( |  | ) | const
| inline

Definition at line 102 of file UninitializedValues.h.

Referenced by getKind().

## ◆ branch_end()

branch_iterator clang::UninitUse::branch_end | ( |  | ) | const
| inline

Definition at line 101 of file UninitializedValues.h.

Referenced by DiagUninitUse().

## ◆ getKind()

Kind clang::UninitUse::getKind | ( |  | ) | const
| inline

Get the kind of uninitialized use.

Definition at line 90 of file UninitializedValues.h.

References AfterCall, AfterDecl, Always, branch_empty(), Maybe, and Sometimes.

Referenced by DiagUninitUse(), and isPointerToConst().

## ◆ getUser()

const Expr* clang::UninitUse::getUser | ( |  | ) | const
| inline

Get the expression containing the uninitialized use.

Definition at line 67 of file UninitializedValues.h.

Referenced by DiagnoseUninitializedUse(), and DiagUninitUse().

## ◆ setUninitAfterCall()

void clang::UninitUse::setUninitAfterCall | ( |  | ) |
| inline

Definition at line 63 of file UninitializedValues.h.

Referenced by isPointerToConst().

## ◆ setUninitAfterDecl()

void clang::UninitUse::setUninitAfterDecl | ( |  | ) |
| inline

Definition at line 64 of file UninitializedValues.h.

Referenced by isPointerToConst().

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

- include/clang/Analysis/Analyses/UninitializedValues.h