diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-08 02:39:23 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-08 02:39:23 +0000 |
commit | a6eb5f81d13bacac01faff70a947047725b4413f (patch) | |
tree | bcaa31849ec52affed208d74b4a6cd821785fb06 /test/FixIt/fixit.cpp | |
parent | b4eb64d8426c0eaa58d398961e0e74ff85063d7c (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.cpp | 12 |
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; + } +} +} + |