summaryrefslogtreecommitdiff
path: root/include/clang/Lex/TokenLexer.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-10-20 21:14:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-10-20 21:14:49 +0000
commit36981b17ed939300f6f8fc2355a255f711fcef71 (patch)
treeee2483e98b09cac943dc93a6969d83ca737ff139 /include/clang/Lex/TokenLexer.h
parent180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (diff)
Notes
Diffstat (limited to 'include/clang/Lex/TokenLexer.h')
-rw-r--r--include/clang/Lex/TokenLexer.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/clang/Lex/TokenLexer.h b/include/clang/Lex/TokenLexer.h
index 45ff8a03442e7..1330ad5f31436 100644
--- a/include/clang/Lex/TokenLexer.h
+++ b/include/clang/Lex/TokenLexer.h
@@ -71,8 +71,10 @@ class TokenLexer {
/// "source location address space".
unsigned MacroStartSLocOffset;
- /// \brief FileID/offset of the start of the macro definition.
- std::pair<FileID, unsigned> MacroDefStartInfo;
+ /// \brief Location of the macro definition.
+ SourceLocation MacroDefStart;
+ /// \brief Length of the macro definition.
+ unsigned MacroDefLength;
/// Lexical information about the expansion point of the macro: the identifier
/// that the macro expanded from had these properties.
@@ -169,7 +171,15 @@ private:
/// \brief If \arg loc is a FileID and points inside the current macro
/// definition, returns the appropriate source location pointing at the
/// macro expansion source location entry.
- SourceLocation getMacroExpansionLocation(SourceLocation loc) const;
+ SourceLocation getExpansionLocForMacroDefLoc(SourceLocation loc) const;
+
+ /// \brief Creates SLocEntries and updates the locations of macro argument
+ /// tokens to their new expanded locations.
+ ///
+ /// \param ArgIdSpellLoc the location of the macro argument id inside the
+ /// macro definition.
+ void updateLocForMacroArgTokens(SourceLocation ArgIdSpellLoc,
+ Token *begin_tokens, Token *end_tokens);
};
} // end namespace clang