aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-07 21:54:45 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-07-07 21:54:45 +0000
commit7a759606d93975866051f67104ae58446e55f404 (patch)
tree7cea5f3d5011bf43b5ba37f3163aa33b3e48ccb1 /include/clang/Lex/Preprocessor.h
parent14ef3191a75b8bcdab391e6ffa6367b731c2ce67 (diff)
Move SourceManager::isAt[Start/End]OfMacroInstantiation functions to the Lexer, since they depend on it now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 56fc9d1727..e1ea37f241 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -753,6 +753,18 @@ public:
return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, Features);
}
+ /// \brief Returns true if the given MacroID location points at the first
+ /// token of the macro instantiation.
+ bool isAtStartOfMacroInstantiation(SourceLocation loc) const {
+ return Lexer::isAtStartOfMacroInstantiation(loc, SourceMgr, Features);
+ }
+
+ /// \brief Returns true if the given MacroID location points at the last
+ /// token of the macro instantiation.
+ bool isAtEndOfMacroInstantiation(SourceLocation loc) const {
+ return Lexer::isAtEndOfMacroInstantiation(loc, SourceMgr, Features);
+ }
+
/// DumpToken - Print the token to stderr, used for debugging.
///
void DumpToken(const Token &Tok, bool DumpFlags = false) const;