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
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index 95d8a88..1993425 100644
--- a/test/FixIt/fixit.cpp
+++ b/test/FixIt/fixit.cpp
@@ -71,3 +71,15 @@
   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;
+    }
+}
+}
+