diff options
| author | Ted Kremenek <kremenek@apple.com> | 2011-02-12 03:03:54 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2011-02-12 03:03:54 +0000 |
| commit | 70aeefa17e9978a0af6a8dd280c51cd8e73f0e14 (patch) | |
| tree | f2d4b8bd077b86de81154e915f116b61eea012d5 /clang/test | |
| parent | 861e49ce3b247b9c204bb4596c63a355ffeb9f03 (diff) | |
| download | bcm5719-llvm-70aeefa17e9978a0af6a8dd280c51cd8e73f0e14.tar.gz bcm5719-llvm-70aeefa17e9978a0af6a8dd280c51cd8e73f0e14.zip | |
Weaken the ObjCSelfInitChecker to only warn when one calls an 'init' method within an 'init' method. This is a temporary stop gap to avoid false positives while we investigate how to make it smarter.
llvm-svn: 125427
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Analysis/self-init.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Analysis/self-init.m b/clang/test/Analysis/self-init.m index b4c6f29e387..b7d41cd02a6 100644 --- a/clang/test/Analysis/self-init.m +++ b/clang/test/Analysis/self-init.m @@ -102,7 +102,7 @@ static id _commonInit(MyObj *self) { } -(id)init6 { - [NSBundle loadNibNamed:@"Window" owner:myivar]; // expected-warning {{Instance variable used}} + [NSBundle loadNibNamed:@"Window" owner:myivar]; // no-warning return [self initWithSomething:0]; } @@ -121,17 +121,17 @@ static id _commonInit(MyObj *self) { } -(id)init9 { - [self doSomething]; - return self; // expected-warning {{Returning 'self'}} + [self doSomething]; + return self; // no-warning } -(id)init10 { - myivar = 0; // expected-warning {{Instance variable used}} - return self; + myivar = 0; // no-warning + return self; } -(id)init11 { - return self; // expected-warning {{Returning 'self'}} + return self; // no-warning } -(id)init12 { |

