clang  13.0.0git
Public Member Functions | Public Attributes | List of all members
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"

Collaboration diagram for clang::EvaluatedStmt:
Collaboration graph
[legend]

Public Member Functions

 EvaluatedStmt ()
 

Public Attributes

bool WasEvaluated: 1
 Whether this statement was already evaluated. More...
 
bool IsEvaluating: 1
 Whether this statement is being evaluated. More...
 
bool HasConstantInitialization: 1
 Whether this variable is known to have constant initialization. More...
 
bool HasConstantDestruction: 1
 Whether this variable is known to have constant destruction. More...
 
bool HasICEInit: 1
 In C++98, whether the initializer is an ICE. More...
 
bool CheckedForICEInit: 1
 
StmtValue
 
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 809 of file Decl.h.

Constructor & Destructor Documentation

◆ EvaluatedStmt()

clang::EvaluatedStmt::EvaluatedStmt ( )
inline

Definition at line 837 of file Decl.h.

Member Data Documentation

◆ CheckedForICEInit

bool clang::EvaluatedStmt::CheckedForICEInit

Definition at line 832 of file Decl.h.

Referenced by clang::VarDecl::hasICEInitializer().

◆ Evaluated

APValue clang::EvaluatedStmt::Evaluated

Definition at line 835 of file Decl.h.

Referenced by clang::VarDecl::getEvaluatedValue().

◆ HasConstantDestruction

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 827 of file Decl.h.

Referenced by clang::ASTNodeImporter::ImportInitializer(), clang::VarDecl::needsDestruction(), clang::ASTDeclReader::UpdateDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().

◆ HasConstantInitialization

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 820 of file Decl.h.

Referenced by clang::VarDecl::checkForConstantInitialization(), clang::VarDecl::hasConstantInitialization(), clang::ASTNodeImporter::ImportInitializer(), clang::ASTDeclReader::UpdateDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().

◆ HasICEInit

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 831 of file Decl.h.

Referenced by clang::VarDecl::hasICEInitializer().

◆ IsEvaluating

bool clang::EvaluatedStmt::IsEvaluating

Whether this statement is being evaluated.

Definition at line 814 of file Decl.h.

◆ Value

Stmt* clang::EvaluatedStmt::Value

◆ WasEvaluated

bool clang::EvaluatedStmt::WasEvaluated

Whether this statement was already evaluated.

Definition at line 811 of file Decl.h.

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


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