clang: include/clang/AST/CurrentSourceLocExprScope.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_CLANG_AST_CURRENTSOURCELOCEXPRSCOPE_H

15#define LLVM_CLANG_AST_CURRENTSOURCELOCEXPRSCOPE_H

16

17#include

18

21

22

23

24

26

27 const Expr *DefaultExpr = nullptr;

28

29public:

30

31

32

34

36

38

39private:

41 : DefaultExpr(DefaultExpr) {}

42

46};

47

49public:

52 : Current(Current), OldVal(Current), Enable(false) {

53 assert(DefaultExpr && "the new scope should not be empty");

54 if ((Enable = (Current.getDefaultExpr() == nullptr)))

56 }

57

59 if (Enable)

60 Current = OldVal;

61 }

62

63private:

66

69 bool Enable;

70};

71

72}

73

74#endif

~SourceLocExprScopeGuard()

Definition CurrentSourceLocExprScope.h:58

SourceLocExprScopeGuard(const Expr *DefaultExpr, CurrentSourceLocExprScope &Current)

Definition CurrentSourceLocExprScope.h:50

Represents the current source location and context used to determine the value of the source location...

Definition CurrentSourceLocExprScope.h:25

CurrentSourceLocExprScope()=default

const Expr * getDefaultExpr() const

Definition CurrentSourceLocExprScope.h:35

This represents one expression.

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