aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-14 01:20:48 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-14 01:20:48 +0000
commit0ff1042ddaad1419264be0de6da17f3b378482a4 (patch)
tree5bd6b2e68aec7d1909621e261c7c63b62a89b7f9 /include/clang/Lex/Preprocessor.h
parent8a9f569262860b8d03203327afd6047be2a9b5a6 (diff)
Add static version of Preprocessor::getSpelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88732 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index facef7b7ae..1c0036e3ed 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -503,6 +503,15 @@ public:
/// UCNs, etc.
std::string getSpelling(const Token &Tok) const;
+ /// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a
+ /// token is the characters used to represent the token in the source file
+ /// after trigraph expansion and escaped-newline folding. In particular, this
+ /// wants to get the true, uncanonicalized, spelling of things like digraphs
+ /// UCNs, etc.
+ static std::string getSpelling(const Token &Tok,
+ const SourceManager &SourceMgr,
+ const LangOptions &Features);
+
/// getSpelling - This method is used to get the spelling of a token into a
/// preallocated buffer, instead of as an std::string. The caller is required
/// to allocate enough space for the token, which is guaranteed to be at least