aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2012-01-19 22:01:51 +0000
committerRichard Trieu <rtrieu@google.com>2012-01-19 22:01:51 +0000
commitfcaf27e185695bdf755e202aeba9632e0a8ef3c6 (patch)
tree92e589aff6c75dcedfa1385163d787e7fc0749cf /lib/Parse/ParseDecl.cpp
parent65eccf007d1275f571f596ca68c9ad6abc906c46 (diff)
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
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 0de8c53d90..00a03390da 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1270,11 +1270,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D,
// 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())