diff options
Diffstat (limited to 'include/clang/Parse/Parser.h')
-rw-r--r-- | include/clang/Parse/Parser.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 31b5022166..c36f34af8c 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -288,10 +288,12 @@ private: Tok.getKind() == tok::utf32_string_literal; } - /// \brief Returns true if the current token is a '=' or '==' and - /// false otherwise. If it's '==', we assume that it's a typo and we emit - /// DiagID and a fixit hint to turn '==' -> '='. - bool isTokenEqualOrMistypedEqualEqual(unsigned DiagID); + /// \brief Returns true if the current token is FoundToken. This token + /// will be assumed a typo. A diagnostic will be emitted with DiagID with a + /// a fixit to replace the current token with ExpectedToken. + bool CreateTokenReplacement(tok::TokenKind ExpectedToken, + tok::TokenKind FoundToken, + unsigned DiagID); /// ConsumeToken - Consume the current 'peek token' and lex the next one. /// This does not work with all kinds of tokens: strings and specific other |