clang: lib/Frontend/Rewrite/RewriteTest.cpp Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

16

20

22

23

25 E = Rewriter.token_end(); I != E; ++I) {

26 if (I->isNot(tok::comment)) continue;

27

28 Rewriter.AddTokenBefore(I, "");

29 Rewriter.AddTokenAfter(I, "");

30 }

31

32

33

35 E = Rewriter.token_end(); I != E; ++I)

37}

Defines the clang::Preprocessor interface.

Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...

Engages in a tight little dance with the lexer to efficiently preprocess tokens.

SourceManager & getSourceManager() const

StringRef getSpelling(SourceLocation loc, SmallVectorImpl< char > &buffer, bool *invalid=nullptr) const

Return the 'spelling' of the token at the given location; does not go up to the spelling location or ...

const LangOptions & getLangOpts() const

Rewriter - This is the main interface to the rewrite buffers.

This class handles loading and caching of source files into memory.

std::list< Token >::const_iterator token_iterator

void DoRewriteTest(Preprocessor &PP, raw_ostream *OS)

DoRewriteTest - A simple test for the TokenRewriter class.

Definition RewriteTest.cpp:17