clang
8.0.0
|
An RAII class that tracks when the Preprocessor starts and stops lexing the definition of a (ISO C/C++) variadic macro. More...
#include "clang/Lex/VariadicMacroSupport.h"
Public Member Functions | |
VariadicMacroScopeGuard (const Preprocessor &P) | |
void | enterScope () |
Client code should call this function just before the Preprocessor is about to Lex tokens from the definition of a variadic (ISO C/C++) macro. More... | |
void | exitScope () |
Client code should call this function as soon as the Preprocessor has either completed lexing the macro's definition tokens, or an error occurred and the context is being exited. More... | |
~VariadicMacroScopeGuard () | |
An RAII class that tracks when the Preprocessor starts and stops lexing the definition of a (ISO C/C++) variadic macro.
As an example, this is useful for unpoisoning and repoisoning certain identifiers (such as VA_ARGS) that are only allowed in this context. Also, being a friend of the Preprocessor class allows it to access PP's cached identifiers directly (as opposed to performing a lookup each time).
Definition at line 31 of file VariadicMacroSupport.h.
|
inline |
Definition at line 37 of file VariadicMacroSupport.h.
References clang::IdentifierInfo::isPoisoned().
|
inline |
Definition at line 66 of file VariadicMacroSupport.h.
References exitScope().
|
inline |
Client code should call this function just before the Preprocessor is about to Lex tokens from the definition of a variadic (ISO C/C++) macro.
Definition at line 50 of file VariadicMacroSupport.h.
References clang::IdentifierInfo::setIsPoisoned().
Referenced by isConfigurationPattern().
|
inline |
Client code should call this function as soon as the Preprocessor has either completed lexing the macro's definition tokens, or an error occurred and the context is being exited.
This function is idempotent (might be explicitly called, and then reinvoked via the destructor).
Definition at line 60 of file VariadicMacroSupport.h.
References clang::IdentifierInfo::setIsPoisoned().
Referenced by ~VariadicMacroScopeGuard().