diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-06-28 16:20:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-06-28 16:20:02 +0000 |
commit | d8bba9c15230d2b1b3893e272106aa79efc50251 (patch) | |
tree | 3528328b9ce5acfffb481a74dc3da8f157bf7ca7 /test/SemaObjC/ivar-ref-misuse.m | |
parent | 020540b7402f6fed6e314d50018543ea08a06b2b (diff) | |
download | clang-d8bba9c15230d2b1b3893e272106aa79efc50251.tar.gz |
Add support for C++ namespace-aware typo correction, e.g., correcting
vector<int>
to
std::vector<int>
Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.
Thanks Kaelyn!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/ivar-ref-misuse.m')
-rw-r--r-- | test/SemaObjC/ivar-ref-misuse.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/SemaObjC/ivar-ref-misuse.m b/test/SemaObjC/ivar-ref-misuse.m index ba2f11594f..f6d9c94084 100644 --- a/test/SemaObjC/ivar-ref-misuse.m +++ b/test/SemaObjC/ivar-ref-misuse.m @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -@interface Sprite { +@interface Sprite { // expected-note{{'Sprite' declared here}} int sprite, spree; int UseGlobalBar; } @@ -17,7 +17,8 @@ int UseGlobalBar; + (void)setFoo:(int)foo { sprite = foo; // expected-error {{instance variable 'sprite' accessed in class method}} spree = foo; - Xsprite = foo; // expected-error {{use of undeclared identifier 'Xsprite'}} + Xsprite = foo; // expected-error {{unknown type name 'Xsprite'; did you mean 'Sprite'?}} \ + // expected-error{{expected identifier or '('}} UseGlobalBar = 10; } + (void)setSprite:(int)sprite { |