aboutsummaryrefslogtreecommitdiff
path: root/test/FixIt/fixit.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2012-01-18 22:54:52 +0000
committerRichard Trieu <rtrieu@google.com>2012-01-18 22:54:52 +0000
commitd6c7c67313634b317a0d63c32be0511a121bb33d (patch)
tree6ad1b344b9e35abc16feaf2077bb26eb258ef6b6 /test/FixIt/fixit.cpp
parent8e87490124b02ffb8eaa06fab26dfc78625613f5 (diff)
Change the error when a '+=' follows a declaration to suggest a fixit to '=' instead of just suggesting a ';'.
Old error: plusequaldeclare1.cc:3:8: error: expected ';' at end of declaration int x += 6; ^ ; New error: plusequaldeclare1.cc:3:9: error: invalid '+=' at end of declaration; did you mean '='? int x += 6; ^~ = git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt/fixit.cpp')
-rw-r--r--test/FixIt/fixit.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index f7bf35b09e..63726b9b6e 100644
--- a/test/FixIt/fixit.cpp
+++ b/test/FixIt/fixit.cpp
@@ -69,13 +69,19 @@ class C {
namespace rdar8488464 {
int x == 0; // expected-error {{invalid '==' at end of declaration; did you mean '='?}}
+int y += 0; // expected-error {{invalid '+=' at end of declaration; did you mean '='?}}
void f() {
int x == 0; // expected-error {{invalid '==' at end of declaration; did you mean '='?}}
(void)x;
+ int y += 0; // expected-error {{invalid '+=' at end of declaration; did you mean '='?}}
+ (void)y;
if (int x == 0) { // expected-error {{invalid '==' at end of declaration; did you mean '='?}}
(void)x;
}
+ if (int y += 0) { // expected-error {{invalid '+=' at end of declaration; did you mean '='?}}
+ (void)y;
+ }
}
}