diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-27 17:53:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-27 17:53:17 +0000 |
commit | b2fb6de9070fea9abc56c8e8d5469066e964cefe (patch) | |
tree | 43e23d4d24ae483d9f8113d57f06fedb19d239c5 /include/clang/Lex/Preprocessor.h | |
parent | 51a75d0cc7651753399efdc3176feaee6214c3ca (diff) |
Clean up and document code modification hints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 9d99142480..ae7d3b6220 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -476,7 +476,7 @@ public: /// copy). The caller is not allowed to modify the returned buffer pointer /// if an internal buffer is returned. unsigned getSpelling(const Token &Tok, const char *&Buffer) const; - + /// getSpellingOfSingleCharacterNumericConstant - Tok is a numeric constant /// with length 1, return the character. char getSpellingOfSingleCharacterNumericConstant(const Token &Tok) const { @@ -498,7 +498,19 @@ public: /// location provides a location of the instantiation point of the token. void CreateString(const char *Buf, unsigned Len, Token &Tok, SourceLocation SourceLoc = SourceLocation()); - + + /// \brief Computes the source location just past the end of the + /// token at this source location. + /// + /// This routine can be used to produce a source location that + /// points just past the end of the token referenced by \p Loc, and + /// is generally used when a diagnostic needs to point just after a + /// token where it expected something different that it received. If + /// the returned source location would not be meaningful (e.g., if + /// it points into a macro), this routine returns an invalid + /// source location. + SourceLocation getLocForEndOfToken(SourceLocation Loc); + /// DumpToken - Print the token to stderr, used for debugging. /// void DumpToken(const Token &Tok, bool DumpFlags = false) const; |