class VAOptExpansionContext
Declaration
class VAOptExpansionContext : private VAOptDefinitionContext { /* full declaration omitted */ };
Description
A class for tracking whether we're inside a VA_OPT during a traversal of the tokens of a macro during macro expansion.
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:118
Inherits from: VAOptDefinitionContext
Member Variables
- private clang::Token SyntheticEOFToken
- private clang::SourceLocation VAOptLoc
- private int NumOfTokensPriorToVAOpt = -1
- private unsigned int LeadingSpaceForStringifiedToken
- private unsigned int StringifyBefore
- private unsigned int CharifyBefore
- private unsigned int BeginsWithPlaceholder
- private unsigned int EndsWithPlaceholder
Method Overview
- public VAOptExpansionContext(clang::Preprocessor & PP)
- public bool beginsWithPlaceholder() const
- public bool endsWithPlaceholder() const
- public const clang::Token & getEOFTok() const
- public bool getLeadingSpaceForStringifiedToken() const
- public unsigned int getNumberOfTokensPriorToVAOpt() const
- public clang::SourceLocation getVAOptLoc() const
- public bool hasCharifyBefore() const
- public void hasPlaceholderAfterHashhashAtStart()
- public void hasPlaceholderBeforeRParen()
- private bool hasStringifyBefore() const
- public bool hasStringifyOrCharifyBefore() const
- private bool isReset() const
- public void reset()
- public void sawHashOrHashAtBefore(const bool HasLeadingSpace, const bool IsHashAt)
- public void sawVAOptFollowedByOpeningParens(const clang::SourceLocation VAOptLoc, const unsigned int NumPriorTokens)
Methods
¶VAOptExpansionContext(clang::Preprocessor& PP)
VAOptExpansionContext(clang::Preprocessor& PP)
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:151
Parameters
¶bool beginsWithPlaceholder() const
bool beginsWithPlaceholder() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:186
¶bool endsWithPlaceholder() const
bool endsWithPlaceholder() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:191
¶const clang::Token& getEOFTok() const
const clang::Token& getEOFTok() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:169
¶bool getLeadingSpaceForStringifiedToken() const
bool getLeadingSpaceForStringifiedToken() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:212
¶unsigned int getNumberOfTokensPriorToVAOpt() const
unsigned int getNumberOfTokensPriorToVAOpt() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:206
¶clang::SourceLocation getVAOptLoc() const
clang::SourceLocation getVAOptLoc() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:229
¶bool hasCharifyBefore() const
bool hasCharifyBefore() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:197
¶void hasPlaceholderAfterHashhashAtStart()
void hasPlaceholderAfterHashhashAtStart()
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:179
¶void hasPlaceholderBeforeRParen()
void hasPlaceholderBeforeRParen()
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:180
¶bool hasStringifyBefore() const
bool hasStringifyBefore() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:139
¶bool hasStringifyOrCharifyBefore() const
bool hasStringifyOrCharifyBefore() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:202
¶bool isReset() const
bool isReset() const
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:145
¶void reset()
void reset()
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:159
¶void sawHashOrHashAtBefore(
const bool HasLeadingSpace,
const bool IsHashAt)
void sawHashOrHashAtBefore(
const bool HasLeadingSpace,
const bool IsHashAt)
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:171
Parameters
- const bool HasLeadingSpace
- const bool IsHashAt
¶void sawVAOptFollowedByOpeningParens(
const clang::SourceLocation VAOptLoc,
const unsigned int NumPriorTokens)
void sawVAOptFollowedByOpeningParens(
const clang::SourceLocation VAOptLoc,
const unsigned int NumPriorTokens)
Declared at: clang/include/clang/Lex/VariadicMacroSupport.h:218
Parameters
- const clang::SourceLocation VAOptLoc
- const unsigned int NumPriorTokens