14#ifndef LLVM_CLANG_LEX_MULTIPLEINCLUDEOPT_H
15#define LLVM_CLANG_LEX_MULTIPLEINCLUDEOPT_H
39 bool ImmediatelyAfterTopLevelIfndef;
46 bool DidMacroExpansion;
59 ReadAnyTokens =
false;
60 ImmediatelyAfterTopLevelIfndef =
false;
61 DidMacroExpansion =
false;
63 DefinedMacro =
nullptr;
75 ImmediatelyAfterTopLevelIfndef =
false;
89 ImmediatelyAfterTopLevelIfndef =
false;
90 DefinedMacro =
nullptr;
102 return ImmediatelyAfterTopLevelIfndef;
107 ReadAnyTokens =
true;
108 ImmediatelyAfterTopLevelIfndef =
false;
137 if (DidMacroExpansion)
141 ReadAnyTokens =
true;
142 ImmediatelyAfterTopLevelIfndef =
true;
163 ReadAnyTokens =
false;
164 ImmediatelyAfterTopLevelIfndef =
false;
Defines the clang::SourceLocation class and associated facilities.
One of these records is kept for each identifier that is lexed.
Implements the simple state machine that the Lexer class uses to detect files subject to the 'multipl...
const IdentifierInfo * GetDefinedMacro() const
If the ControllingMacro is followed by a macro definition, return the macro that was defined.
void Invalidate()
Invalidate - Permanently mark this file as not being suitable for the include-file optimization.
bool getHasReadAnyTokensVal() const
getHasReadAnyTokensVal - This is used for the #ifndef handshake at the top of the file when reading p...
void ExitTopLevelConditional()
Called when the lexer exits the top-level conditional.
void SetDefinedMacro(IdentifierInfo *M, SourceLocation Loc)
void SetReadToken(bool Value)
SetReadToken - Set whether the value of 'ReadAnyTokens'.
bool getImmediatelyAfterTopLevelIfndef() const
getImmediatelyAfterTopLevelIfndef - returns true if the last directive was an #ifndef at the beginnin...
const IdentifierInfo * GetControllingMacroAtEndOfFile() const
Once the entire file has been lexed, if there is a controlling macro, return it.
SourceLocation GetDefinedLocation() const
void EnterTopLevelConditional()
Invoked when a top level conditional (except #ifndef) is found.
void resetImmediatelyAfterTopLevelIfndef()
SourceLocation GetMacroLocation() const
void EnterTopLevelIfndef(const IdentifierInfo *M, SourceLocation Loc)
Called when entering a top-level #ifndef directive (or the "\#if !defined" equivalent) without any pr...
void ExpandedMacro()
ExpandedMacro - When a macro is expanded with this lexer as the current buffer, this method is called...
Encodes a location in the source.
The JSON file list parser is used to communicate input to InstallAPI.