clang 10.0.0git

Public Member Functions | List of all members
clang::VAOptExpansionContext Class Reference

A class for tracking whether we're inside a VA_OPT during a traversal of the tokens of a macro during macro expansion. More...

`#include "clang/Lex/VariadicMacroSupport.h"`

Inheritance diagram for clang::VAOptExpansionContext:
[legend]
Collaboration diagram for clang::VAOptExpansionContext:
[legend]

## Public Member Functions
| VAOptExpansionContext (Preprocessor &PP)
void | reset ()
const Token & | getEOFTok () const
void | sawHashOrHashAtBefore (const bool HasLeadingSpace, const bool IsHashAt)
void | hasPlaceholderAfterHashhashAtStart ()
void | hasPlaceholderBeforeRParen ()
bool | beginsWithPlaceholder () const
bool | endsWithPlaceholder () const
bool | hasCharifyBefore () const
bool | hasStringifyOrCharifyBefore () const
unsigned int | getNumberOfTokensPriorToVAOpt () const
bool | getLeadingSpaceForStringifiedToken () const
void | sawVAOptFollowedByOpeningParens (const SourceLocation VAOptLoc, const unsigned int NumPriorTokens)
SourceLocation | getVAOptLoc () const

## Detailed Description

A class for tracking whether we're inside a VA_OPT during a traversal of the tokens of a macro during macro expansion.

Definition at line 122 of file VariadicMacroSupport.h.

## Constructor & Destructor Documentation

## ◆ VAOptExpansionContext()

clang::VAOptExpansionContext::VAOptExpansionContext | ( | Preprocessor & | PP | ) |
| inline

Definition at line 155 of file VariadicMacroSupport.h.

References clang::comments::tok::eof, clang::Token::setKind(), and clang::Token::startToken().

## Member Function Documentation

## ◆ beginsWithPlaceholder()

bool clang::VAOptExpansionContext::beginsWithPlaceholder | ( |  | ) | const
| inline

Definition at line 190 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ endsWithPlaceholder()

bool clang::VAOptExpansionContext::endsWithPlaceholder | ( |  | ) | const
| inline

Definition at line 195 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ getEOFTok()

const Token& clang::VAOptExpansionContext::getEOFTok | ( |  | ) | const
| inline

Definition at line 173 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ getLeadingSpaceForStringifiedToken()

bool clang::VAOptExpansionContext::getLeadingSpaceForStringifiedToken | ( |  | ) | const
| inline

Definition at line 216 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ getNumberOfTokensPriorToVAOpt()

unsigned int clang::VAOptExpansionContext::getNumberOfTokensPriorToVAOpt | ( |  | ) | const
| inline

Definition at line 210 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ getVAOptLoc()

SourceLocation clang::VAOptExpansionContext::getVAOptLoc | ( |  | ) | const
| inline

Definition at line 233 of file VariadicMacroSupport.h.

References clang::VAOptDefinitionContext::isInVAOpt(), clang::SourceLocation::isValid(), clang::VAOptDefinitionContext::isVAOptToken(), clang::VAOptDefinitionContext::sawClosingParen(), and clang::VAOptDefinitionContext::sawOpeningParen().

Referenced by clang::TokenLexer::Init().

## ◆ hasCharifyBefore()

bool clang::VAOptExpansionContext::hasCharifyBefore | ( |  | ) | const
| inline

Definition at line 201 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ hasPlaceholderAfterHashhashAtStart()

void clang::VAOptExpansionContext::hasPlaceholderAfterHashhashAtStart | ( |  | ) |
| inline

Definition at line 183 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ hasPlaceholderBeforeRParen()

void clang::VAOptExpansionContext::hasPlaceholderBeforeRParen | ( |  | ) |
| inline

Definition at line 184 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ hasStringifyOrCharifyBefore()

bool clang::VAOptExpansionContext::hasStringifyOrCharifyBefore | ( |  | ) | const
| inline

Definition at line 206 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ reset()

void clang::VAOptExpansionContext::reset | ( |  | ) |
| inline

Definition at line 163 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ sawHashOrHashAtBefore()

void clang::VAOptExpansionContext::sawHashOrHashAtBefore | ( | const bool | HasLeadingSpace,
|  | const bool | IsHashAt
| ) |  |
| inline

Definition at line 175 of file VariadicMacroSupport.h.

Referenced by clang::TokenLexer::Init().

## ◆ sawVAOptFollowedByOpeningParens()

void clang::VAOptExpansionContext::sawVAOptFollowedByOpeningParens | ( | const SourceLocation | VAOptLoc,
|  | const unsigned int | NumPriorTokens
| ) |  |
| inline

Definition at line 222 of file VariadicMacroSupport.h.

References clang::SourceLocation::isFileID(), and clang::VAOptDefinitionContext::sawVAOptFollowedByOpeningParens().

Referenced by clang::TokenLexer::Init().

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

- include/clang/Lex/VariadicMacroSupport.h