clang  6.0.0svn
Public Types | Public Attributes | List of all members
DefinedTracker Struct Reference

DefinedTracker - This struct is used while parsing expressions to keep track of whether !defined(X) has been seen. More...

Collaboration diagram for DefinedTracker:
Collaboration graph
[legend]

Public Types

enum  TrackerState { DefinedMacro, NotDefinedMacro, Unknown }
 Each time a Value is evaluated, it returns information about whether the parsed value is of the form defined(X), !defined(X) or is something else. More...
 

Public Attributes

enum DefinedTracker::TrackerState State
 
IdentifierInfoTheMacro
 TheMacro - When the state is DefinedMacro or NotDefinedMacro, this indicates the macro that was checked. More...
 
bool IncludedUndefinedIds = false
 

Detailed Description

DefinedTracker - This struct is used while parsing expressions to keep track of whether !defined(X) has been seen.

With this simple scheme, we handle the basic forms: !defined(X) and !defined X but we also trivially handle (silly) stuff like: !!!defined(X) and +!defined(X) and !+!+!defined(X) and !(defined(X)).

Definition at line 86 of file PPExpressions.cpp.

Member Enumeration Documentation

◆ TrackerState

Each time a Value is evaluated, it returns information about whether the parsed value is of the form defined(X), !defined(X) or is something else.

Enumerator
DefinedMacro 
NotDefinedMacro 
Unknown 

Definition at line 89 of file PPExpressions.cpp.

Member Data Documentation

◆ IncludedUndefinedIds

bool DefinedTracker::IncludedUndefinedIds = false

Definition at line 97 of file PPExpressions.cpp.

Referenced by EvaluateDefined(), EvaluateDirectiveSubExpr(), and EvaluateValue().

◆ State

enum DefinedTracker::TrackerState DefinedTracker::State

◆ TheMacro

IdentifierInfo* DefinedTracker::TheMacro

TheMacro - When the state is DefinedMacro or NotDefinedMacro, this indicates the macro that was checked.

Definition at line 96 of file PPExpressions.cpp.

Referenced by EvaluateDefined(), and EvaluateDirectiveSubExpr().


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