Extend the error of invalid token after declarations to include fixits for
!=, %=, ^=, &=, *=, -=, |=, /=, <<=, <=, >=, and >>= to =.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148499 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 0de8c53..00a0339 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1270,11 +1270,7 @@
// Parse declarator '=' initializer.
// If a '==' or '+=' is found, suggest a fixit to '='.
- if (Tok.is(tok::equal) ||
- CreateTokenReplacement(tok::equal, tok::equalequal,
- diag::err_invalid_equalequal_after_declarator) ||
- CreateTokenReplacement(tok::equal, tok::plusequal,
- diag::err_invalid_plusequal_after_declarator)) {
+ if (isTokenEqualOrEqualTypo()) {
ConsumeToken();
if (Tok.is(tok::kw_delete)) {
if (D.isFunctionDeclarator())