diff options
| author | Alp Toker <alp@nuanti.com> | 2014-01-06 12:54:07 +0000 |
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2014-01-06 12:54:07 +0000 |
| commit | 6d35eab5a6f575f557c266892f6dedf951851828 (patch) | |
| tree | 7294416d00202eca206751ed91a863c3475867ef /clang | |
| parent | 7649ebacd6f15c6f9226bc007d67839b1f5cc9d7 (diff) | |
| download | bcm5719-llvm-6d35eab5a6f575f557c266892f6dedf951851828.tar.gz bcm5719-llvm-6d35eab5a6f575f557c266892f6dedf951851828.zip | |
Rename getTokenSimpleSpelling() to getPunctuatorSpelling()
That's what it does, what the documentation says it does and what callers
expect it to do.
llvm-svn: 198603
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/include/clang/Basic/TokenKinds.h | 2 | ||||
| -rw-r--r-- | clang/lib/Basic/Diagnostic.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Basic/TokenKinds.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Parse/Parser.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/clang/include/clang/Basic/TokenKinds.h b/clang/include/clang/Basic/TokenKinds.h index 53f006a8871..e77e732f703 100644 --- a/clang/include/clang/Basic/TokenKinds.h +++ b/clang/include/clang/Basic/TokenKinds.h @@ -63,7 +63,7 @@ const char *getTokenName(enum TokenKind Kind) LLVM_READNONE; /// and will not produce any alternative spellings (e.g., a /// digraph). For the actual spelling of a given Token, use /// Preprocessor::getSpelling(). -const char *getTokenSimpleSpelling(enum TokenKind Kind) LLVM_READNONE; +const char *getPunctuatorSpelling(enum TokenKind Kind) LLVM_READNONE; /// \brief Return true if this is a raw identifier or an identifier kind. inline bool isAnyIdentifier(TokenKind K) { diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp index eaae388fd8d..9d7643b3622 100644 --- a/clang/lib/Basic/Diagnostic.cpp +++ b/clang/lib/Basic/Diagnostic.cpp @@ -831,7 +831,7 @@ FormatDiagnostic(const char *DiagStr, const char *DiagEnd, if (const char *S = getTokenNameForDiagnostic(Kind)) // Unquoted translatable token name. Out << S; - else if (const char *S = tok::getTokenSimpleSpelling(Kind)) + else if (const char *S = tok::getPunctuatorSpelling(Kind)) // Quoted token spelling, currently only covers punctuators. Out << '\'' << S << '\''; else if (const char *S = tok::getTokenName(Kind)) diff --git a/clang/lib/Basic/TokenKinds.cpp b/clang/lib/Basic/TokenKinds.cpp index f62624c55a2..2a9c9bfa2f9 100644 --- a/clang/lib/Basic/TokenKinds.cpp +++ b/clang/lib/Basic/TokenKinds.cpp @@ -29,7 +29,7 @@ const char *tok::getTokenName(enum TokenKind Kind) { return 0; } -const char *tok::getTokenSimpleSpelling(enum TokenKind Kind) { +const char *tok::getPunctuatorSpelling(enum TokenKind Kind) { switch (Kind) { #define PUNCTUATOR(X,Y) case X: return Y; #include "clang/Basic/TokenKinds.def" diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 0caf152a069..27e16a7914d 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -164,7 +164,7 @@ bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, SourceLocation Loc = Tok.getLocation(); DiagnosticBuilder DB = Diag(Loc, DiagID); DB << FixItHint::CreateReplacement(SourceRange(Loc), - getTokenSimpleSpelling(ExpectedTok)); + getPunctuatorSpelling(ExpectedTok)); if (DiagID == diag::err_expected) DB << ExpectedTok; else if (DiagID == diag::err_expected_after) @@ -180,7 +180,7 @@ bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, SourceLocation EndLoc = PP.getLocForEndOfToken(PrevTokLocation); const char *Spelling = 0; if (EndLoc.isValid()) - Spelling = tok::getTokenSimpleSpelling(ExpectedTok); + Spelling = tok::getPunctuatorSpelling(ExpectedTok); DiagnosticBuilder DB = Spelling |

