summaryrefslogtreecommitdiff
path: root/include/clang/Lex/TokenLexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Lex/TokenLexer.h')
-rw-r--r--include/clang/Lex/TokenLexer.h44
1 files changed, 21 insertions, 23 deletions
diff --git a/include/clang/Lex/TokenLexer.h b/include/clang/Lex/TokenLexer.h
index 98935ad9c4fa2..6aae9eec7bfa5 100644
--- a/include/clang/Lex/TokenLexer.h
+++ b/include/clang/Lex/TokenLexer.h
@@ -31,18 +31,17 @@ class VAOptExpansionContext;
class TokenLexer {
friend class Preprocessor;
- /// Macro - The macro we are expanding from. This is null if expanding a
- /// token stream.
+ /// The macro we are expanding from. This is null if expanding a token stream.
MacroInfo *Macro = nullptr;
- /// ActualArgs - The actual arguments specified for a function-like macro, or
- /// null. The TokenLexer owns the pointed-to object.
+ /// The actual arguments specified for a function-like macro, or null. The
+ /// TokenLexer owns the pointed-to object.
MacroArgs *ActualArgs = nullptr;
- /// PP - The current preprocessor object we are expanding for.
+ /// The current preprocessor object we are expanding for.
Preprocessor &PP;
- /// Tokens - This is the pointer to an array of tokens that the macro is
+ /// This is the pointer to an array of tokens that the macro is
/// defined to, with arguments expanded for function-like macros. If this is
/// a token stream, these are the tokens we are returning. This points into
/// the macro definition we are lexing from, a cache buffer that is owned by
@@ -52,14 +51,13 @@ class TokenLexer {
/// may update the pointer as needed.
const Token *Tokens;
- /// NumTokens - This is the length of the Tokens array.
+ /// This is the length of the Tokens array.
unsigned NumTokens;
/// This is the index of the next token that Lex will return.
unsigned CurTokenIdx;
- /// ExpandLocStart/End - The source location range where this macro was
- /// expanded.
+ /// The source location range where this macro was expanded.
SourceLocation ExpandLocStart, ExpandLocEnd;
/// Source location pointing at the source location entry chunk that
@@ -81,7 +79,7 @@ class TokenLexer {
bool AtStartOfLine : 1;
bool HasLeadingSpace : 1;
- // NextTokGetsSpace - When this is true, the next token appended to the
+ // When this is true, the next token appended to the
// output list during function argument expansion will get a leading space,
// regardless of whether it had one to begin with or not. This is used for
// placemarker support. If still true after function argument expansion, the
@@ -89,13 +87,13 @@ class TokenLexer {
// expansion.
bool NextTokGetsSpace : 1;
- /// OwnsTokens - This is true if this TokenLexer allocated the Tokens
+ /// This is true if this TokenLexer allocated the Tokens
/// array, and thus needs to free it when destroyed. For simple object-like
/// macros (for example) we just point into the token buffer of the macro
/// definition, we don't make a copy of it.
bool OwnsTokens : 1;
- /// DisableMacroExpansion - This is true when tokens lexed from the TokenLexer
+ /// This is true when tokens lexed from the TokenLexer
/// should not be subject to further macro expansion.
bool DisableMacroExpansion : 1;
@@ -123,14 +121,14 @@ public:
TokenLexer &operator=(const TokenLexer &) = delete;
~TokenLexer() { destroy(); }
- /// Init - Initialize this TokenLexer to expand from the specified macro
+ /// Initialize this TokenLexer to expand from the specified macro
/// with the specified argument information. Note that this ctor takes
/// ownership of the ActualArgs pointer. ILEnd specifies the location of the
/// ')' for a function-like macro or the identifier for an object-like macro.
- void Init(Token &Tok, SourceLocation ILEnd, MacroInfo *MI,
- MacroArgs *ActualArgs);
+ void Init(Token &Tok, SourceLocation ELEnd, MacroInfo *MI,
+ MacroArgs *Actuals);
- /// Init - Initialize this TokenLexer with the specified token stream.
+ /// Initialize this TokenLexer with the specified token stream.
/// This does not take ownership of the specified token vector.
///
/// DisableExpansion is true when macro expansion of tokens lexed from this
@@ -138,12 +136,12 @@ public:
void Init(const Token *TokArray, unsigned NumToks,
bool DisableMacroExpansion, bool OwnsTokens);
- /// isNextTokenLParen - If the next token lexed will pop this macro off the
+ /// If the next token lexed will pop this macro off the
/// expansion stack, return 2. If the next unexpanded token is a '(', return
/// 1, otherwise return 0.
unsigned isNextTokenLParen() const;
- /// Lex - Lex and return a token from this macro stream.
+ /// Lex and return a token from this macro stream.
bool Lex(Token &Tok);
/// isParsingPreprocessorDirective - Return true if we are in the middle of a
@@ -153,8 +151,8 @@ public:
private:
void destroy();
- /// isAtEnd - Return true if the next lex call will pop this macro off the
- /// include stack.
+ /// Return true if the next lex call will pop this macro off the include
+ /// stack.
bool isAtEnd() const {
return CurTokenIdx == NumTokens;
}
@@ -193,7 +191,7 @@ private:
/// them into a string. \p VCtx is used to determine which token represents
/// the first __VA_OPT__ replacement token.
///
- /// \param[in,out] ReplacementToks - Contains the current Replacement Tokens
+ /// \param[in,out] ResultToks - Contains the current Replacement Tokens
/// (prior to rescanning and token pasting), the tail end of which represents
/// the tokens just expanded through __VA_OPT__ processing. These (sub)
/// sequence of tokens are folded into one stringified token.
@@ -201,7 +199,7 @@ private:
/// \param[in] VCtx - contains relevant contextual information about the
/// state of the tokens around and including the __VA_OPT__ token, necessary
/// for stringification.
- void stringifyVAOPTContents(SmallVectorImpl<Token> &ReplacementToks,
+ void stringifyVAOPTContents(SmallVectorImpl<Token> &ResultToks,
const VAOptExpansionContext &VCtx,
SourceLocation VAOPTClosingParenLoc);
@@ -209,7 +207,7 @@ private:
/// return preexpanded tokens from Tokens.
void ExpandFunctionArguments();
- /// HandleMicrosoftCommentPaste - In microsoft compatibility mode, /##/ pastes
+ /// In microsoft compatibility mode, /##/ pastes
/// together to form a comment that comments out everything in the current
/// macro, other active macros, and anything left on the current physical
/// source line of the expanded buffer. Handle this by returning the