clang 20.0.0git
|
PragmaHandler - Instances of this interface defined to handle the various pragmas that the language front-end uses. More...
#include "clang/Lex/Pragma.h"
Public Member Functions | |
PragmaHandler ()=default | |
PragmaHandler (StringRef name) | |
virtual | ~PragmaHandler () |
StringRef | getName () const |
virtual void | HandlePragma (Preprocessor &PP, PragmaIntroducer Introducer, Token &FirstToken)=0 |
virtual PragmaNamespace * | getIfNamespace () |
getIfNamespace - If this is a namespace, return it. | |
PragmaHandler - Instances of this interface defined to handle the various pragmas that the language front-end uses.
Each handler optionally has a name (e.g. "pack") and the HandlePragma method is invoked when a pragma with that identifier is found. If a handler does not match any of the declared pragmas the handler with a null identifier is invoked, if it exists.
Note that the PragmaNamespace class can be used to subdivide pragmas, e.g. we treat "\#pragma STDC" and "\#pragma GCC" as namespaces that contain other pragmas.
|
default |
|
inlineexplicit |
|
virtualdefault |
|
inlinevirtual |
getIfNamespace - If this is a namespace, return it.
This is equivalent to using a dynamic_cast, but doesn't require RTTI.
Reimplemented in clang::PragmaNamespace.
Definition at line 79 of file Pragma.h.
Referenced by clang::Preprocessor::RemovePragmaHandler().
|
inline |
Definition at line 73 of file Pragma.h.
Referenced by clang::PragmaNamespace::AddPragma(), clang::Preprocessor::AddPragmaHandler(), and clang::PragmaNamespace::RemovePragmaHandler().
|
pure virtual |
Implemented in clang::EmptyPragmaHandler, and clang::PragmaNamespace.
Referenced by clang::PragmaNamespace::HandlePragma().