clang: include/clang/Sema/EnterExpressionEvaluationContext.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_CLANG_SEMA_ENTEREXPRESSIONEVALUATIONCONTEXT_H

10#define LLVM_CLANG_SEMA_ENTEREXPRESSIONEVALUATIONCONTEXT_H

11

13

15

17

18

20 Sema &Actions;

21 bool Entered = true;

22

23public:

26 Decl *LambdaContextDecl = nullptr,

29 bool ShouldEnter = true)

30 : Actions(Actions), Entered(ShouldEnter) {

31 if (Entered)

33 ExprContext);

34 }

40 : Actions(Actions) {

43 }

44

47 bool ShouldEnter = true)

48 : Actions(Actions), Entered(false) {

49

50

51

52

57 Entered = true;

58 }

59 }

60

62 if (Entered)

64 }

65};

66

67}

68

69#endif

Decl - This represents one declaration (or definition), e.g.

RAII object that enters a new expression evaluation context.

EnterExpressionEvaluationContext(Sema &Actions, InitListTag, bool ShouldEnter=true)

EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Sema::ReuseLambdaContextDecl_t, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other)

~EnterExpressionEvaluationContext()

EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other, bool ShouldEnter=true)

Sema - This implements semantic analysis and AST building for C.

void PushExpressionEvaluationContext(ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)

void PopExpressionEvaluationContext()

const LangOptions & getLangOpts() const

bool isUnevaluatedContext() const

Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.

ExpressionEvaluationContext

Describes how the expressions currently being parsed are evaluated at run-time, if at all.

@ UnevaluatedList

The current expression occurs within a braced-init-list within an unevaluated operand.

@ Decl

The l-value was an access to a declared entity or something equivalently strong, like the address of ...

The JSON file list parser is used to communicate input to InstallAPI.

ExpressionKind

Describes whether we are in an expression constext which we have to handle differently.