diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-11 20:08:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-11 20:08:03 +0000 |
commit | ab0e8873c37bfcd292a17dafc61d6baff7caf30d (patch) | |
tree | 598f590713dca82042d9de659a8463ea760966ae /test/SemaObjC/unused.m | |
parent | e64941280877d065a27e8cefd2a9038256d0e3ac (diff) |
Fix rdar://7126285: don't warn on unused ObjC property access
that uses "dot syntax" since it might have a side effect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78704 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/unused.m')
-rw-r--r-- | test/SemaObjC/unused.m | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/SemaObjC/unused.m b/test/SemaObjC/unused.m index 88c6f1054c..d4660cdc00 100644 --- a/test/SemaObjC/unused.m +++ b/test/SemaObjC/unused.m @@ -1,4 +1,4 @@ -// RUN: clang-cc %s -verify -fsyntax-only +// RUN: clang-cc %s -verify -Wunused -fsyntax-only #include <stdio.h> @interface Greeter @@ -11,6 +11,21 @@ } @end + + + +@interface NSObject @end +@interface NSString : NSObject +- (int)length; +@end + +void test() { + // No unused warning: rdar://7126285 + @"pointless example call for test purposes".length; +} + + + int main (void) { [Greeter hello]; return 0; |