clang 22.0.0git
|
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 | |
bool | WasEvaluated: 1 |
Whether this statement was already evaluated. | |
bool | IsEvaluating: 1 |
Whether this statement is being evaluated. | |
bool | HasConstantInitialization: 1 |
Whether this variable is known to have constant initialization. | |
bool | HasConstantDestruction: 1 |
Whether this variable is known to have constant destruction. | |
bool | HasICEInit: 1 |
In C++98, whether the initializer is an ICE. | |
bool | CheckedForICEInit: 1 |
bool | HasSideEffects: 1 |
bool | CheckedForSideEffects: 1 |
LazyDeclStmtPtr | Value |
APValue | Evaluated |
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).
|
inline |
Definition at line 917 of file Decl.h.
References CheckedForICEInit, CheckedForSideEffects, false, HasConstantDestruction, HasConstantInitialization, HasICEInit, HasSideEffects, IsEvaluating, and WasEvaluated.
bool clang::EvaluatedStmt::CheckedForICEInit |
Definition at line 909 of file Decl.h.
Referenced by EvaluatedStmt(), and clang::VarDecl::hasICEInitializer().
bool clang::EvaluatedStmt::CheckedForSideEffects |
Definition at line 912 of file Decl.h.
Referenced by EvaluatedStmt(), clang::VarDecl::hasInitWithSideEffects(), and clang::ASTDeclReader::ReadVarDeclInit().
APValue clang::EvaluatedStmt::Evaluated |
Definition at line 915 of file Decl.h.
Referenced by clang::VarDecl::getEvaluatedValue(), and clang::ASTDeclReader::ReadVarDeclInit().
bool 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 904 of file Decl.h.
Referenced by EvaluatedStmt(), clang::ASTNodeImporter::ImportInitializer(), clang::VarDecl::needsDestruction(), and clang::ASTDeclReader::ReadVarDeclInit().
bool 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 897 of file Decl.h.
Referenced by clang::VarDecl::checkForConstantInitialization(), EvaluatedStmt(), clang::VarDecl::hasConstantInitialization(), clang::ASTNodeImporter::ImportInitializer(), and clang::ASTDeclReader::ReadVarDeclInit().
bool 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 908 of file Decl.h.
Referenced by EvaluatedStmt(), and clang::VarDecl::hasICEInitializer().
bool clang::EvaluatedStmt::HasSideEffects |
Definition at line 911 of file Decl.h.
Referenced by EvaluatedStmt(), clang::VarDecl::hasInitWithSideEffects(), and clang::ASTDeclReader::ReadVarDeclInit().
bool clang::EvaluatedStmt::IsEvaluating |
Whether this statement is being evaluated.
Definition at line 891 of file Decl.h.
Referenced by EvaluatedStmt().
LazyDeclStmtPtr clang::EvaluatedStmt::Value |
Definition at line 914 of file Decl.h.
Referenced by clang::VarDecl::ensureEvaluatedStmt(), and clang::ASTDeclReader::ReadVarDeclInit().
bool 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().