aboutsummaryrefslogtreecommitdiff
path: root/test/FixIt/fixit.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-08 02:39:23 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-10-08 02:39:23 +0000
commita6eb5f81d13bacac01faff70a947047725b4413f (patch)
treebcaa31849ec52affed208d74b4a6cd821785fb06 /test/FixIt/fixit.cpp
parentb4eb64d8426c0eaa58d398961e0e74ff85063d7c (diff)
When we encounter a '==' in a context expecting a '=', assume the user made a typo:
t.c:1:7: error: invalid '==' at end of declaration; did you mean '='? int x == 0; ^~ = Implements rdar://8488464. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116035 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt/fixit.cpp')
-rw-r--r--test/FixIt/fixit.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index 95d8a88af1..1993425c95 100644
--- a/test/FixIt/fixit.cpp
+++ b/test/FixIt/fixit.cpp
@@ -71,3 +71,15 @@ class C {
int C::foo();
};
+namespace rdar8488464 {
+int x == 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;
+ if (int x == 0) { // expected-error {{invalid '==' at end of declaration; did you mean '='?}}
+ (void)x;
+ }
+}
+}
+