clang 8.0.0

Functions
RewriteMacros.cpp File Reference
`#include "clang/Rewrite/Frontend/Rewriters.h"`
`#include "clang/Basic/SourceManager.h"`
`#include "clang/Lex/Preprocessor.h"`
`#include "clang/Rewrite/Core/Rewriter.h"`
`#include "llvm/Support/Path.h"`
`#include "llvm/Support/raw_ostream.h"`
`#include <cstdio>`
`#include <memory>`
Include dependency graph for RewriteMacros.cpp:

Go to the source code of this file.

## Functions
static bool | isSameToken (Token &RawTok, Token &PPTok)
| isSameToken - Return true if the two specified tokens start have the same content. More...
static const Token & | GetNextRawTok (const std::vector< Token > &RawTokens, unsigned &CurTok, bool ReturnComment)
| GetNextRawTok - Return the next raw token in the stream, skipping over comments if ReturnComment is false. More...
static void | LexRawTokensFromMainFile (Preprocessor &PP, std::vector< Token > &RawTokens)
| LexRawTokensFromMainFile - Lets all the raw tokens from the main file into the specified vector. More...

## Function Documentation

## ◆ GetNextRawTok()

static const Token& GetNextRawTok | ( | const std::vector< Token > & | RawTokens,
|  | unsigned & | CurTok,
|  | bool | ReturnComment
| ) |  |
| static

GetNextRawTok - Return the next raw token in the stream, skipping over comments if ReturnComment is false.

Definition at line 48 of file RewriteMacros.cpp.

Referenced by clang::RewriteMacrosInInput().

## ◆ isSameToken()

static bool isSameToken | ( | Token & | RawTok,
|  | Token & | PPTok
| ) |  |
| static

isSameToken - Return true if the two specified tokens start have the same content.

Definition at line 28 of file RewriteMacros.cpp.

References clang::Token::getIdentifierInfo(), and clang::Token::getKind().

Referenced by clang::RewriteMacrosInInput().

## ◆ LexRawTokensFromMainFile()

static void LexRawTokensFromMainFile | ( | Preprocessor & | PP,
|  | std::vector< Token > & | RawTokens
| ) |  |
| static

LexRawTokensFromMainFile - Lets all the raw tokens from the main file into the specified vector.

Definition at line 62 of file RewriteMacros.cpp.

References clang::comments::tok::eof, clang::SourceManager::getBuffer(), clang::Preprocessor::getLangOpts(), clang::SourceManager::getMainFileID(), clang::Preprocessor::getSourceManager(), clang::Token::is(), clang::Token::isNot(), clang::Preprocessor::LookUpIdentifierInfo(), clang::Lexer::SetCommentRetentionState(), and SM.

Referenced by clang::RewriteMacrosInInput().