clang 23.0.0git
clang::EvaluatedStmt Struct Reference

Structure used to store a statement, the constant value to which it was evaluated (if any), and whether or not the statement is an integral constant expression (if known). More...

#include "clang/AST/Decl.h"

Public Member Functions

 EvaluatedStmt ()

Public Attributes

unsigned WasEvaluated: 1
 Whether this statement was already evaluated.
unsigned IsEvaluating: 1
 Whether this statement is being evaluated.
unsigned HasConstantInitialization: 1
 Whether this variable is known to have constant initialization.
unsigned HasConstantDestruction: 1
 Whether this variable is known to have constant destruction.
unsigned HasICEInit: 1
 In C++98, whether the initializer is an ICE.
unsigned CheckedForICEInit: 1
unsigned HasSideEffects: 1
unsigned CheckedForSideEffects: 1
LazyDeclStmtPtr Value
APValue Evaluated

Detailed Description

Structure used to store a statement, the constant value to which it was evaluated (if any), and whether or not the statement is an integral constant expression (if known).

Definition at line 885 of file Decl.h.

Constructor & Destructor Documentation

◆ EvaluatedStmt()

clang::EvaluatedStmt::EvaluatedStmt ( )
inline

Member Data Documentation

◆ CheckedForICEInit

unsigned clang::EvaluatedStmt::CheckedForICEInit

Definition at line 914 of file Decl.h.

Referenced by EvaluatedStmt(), and clang::VarDecl::hasICEInitializer().

◆ CheckedForSideEffects

unsigned clang::EvaluatedStmt::CheckedForSideEffects

◆ Evaluated

APValue clang::EvaluatedStmt::Evaluated

◆ HasConstantDestruction

unsigned clang::EvaluatedStmt::HasConstantDestruction

Whether this variable is known to have constant destruction.

That is, whether running the destructor on the initial value is a side-effect (and doesn't inspect any state that might have changed during program execution). This is currently only computed if the destructor is non-trivial.

Definition at line 907 of file Decl.h.

Referenced by EvaluatedStmt(), clang::ASTNodeImporter::ImportInitializer(), clang::VarDecl::needsDestruction(), and clang::ASTDeclReader::ReadVarDeclInit().

◆ HasConstantInitialization

unsigned clang::EvaluatedStmt::HasConstantInitialization

Whether this variable is known to have constant initialization.

This is currently only computed in C++, for static / thread storage duration variables that might have constant initialization and for variables that are usable in constant expressions.

Definition at line 899 of file Decl.h.

Referenced by clang::VarDecl::checkForConstantInitialization(), EvaluatedStmt(), clang::VarDecl::hasConstantInitialization(), clang::ASTNodeImporter::ImportInitializer(), and clang::ASTDeclReader::ReadVarDeclInit().

◆ HasICEInit

unsigned clang::EvaluatedStmt::HasICEInit

In C++98, whether the initializer is an ICE.

This affects whether the variable is usable in constant expressions.

Definition at line 912 of file Decl.h.

Referenced by EvaluatedStmt(), and clang::VarDecl::hasICEInitializer().

◆ HasSideEffects

unsigned clang::EvaluatedStmt::HasSideEffects

◆ IsEvaluating

unsigned clang::EvaluatedStmt::IsEvaluating

Whether this statement is being evaluated.

Definition at line 892 of file Decl.h.

Referenced by EvaluatedStmt().

◆ Value

LazyDeclStmtPtr clang::EvaluatedStmt::Value

◆ WasEvaluated

unsigned clang::EvaluatedStmt::WasEvaluated

Whether this statement was already evaluated.

Definition at line 888 of file Decl.h.

Referenced by clang::VarDecl::checkForConstantInitialization(), EvaluatedStmt(), clang::VarDecl::getEvaluatedValue(), and clang::ASTDeclReader::ReadVarDeclInit().


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