[cfe-commits] r172104 - in /cfe/trunk: lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp test/Analysis/objc_invalidation.m

Dmitri Gribenko gribozavr at gmail.com
Thu Jan 10 13:58:37 PST 2013


On Thu, Jan 10, 2013 at 10:59 PM, Anna Zaks <ganna at apple.com> wrote:
> Modified: cfe/trunk/test/Analysis/objc_invalidation.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/objc_invalidation.m?rev=172104&r1=172103&r2=172104&view=diff
> ==============================================================================
> --- cfe/trunk/test/Analysis/objc_invalidation.m (original)
> +++ cfe/trunk/test/Analysis/objc_invalidation.m Thu Jan 10 14:59:51 2013
> @@ -180,3 +180,43 @@
>    // no-warning
>  }
>  @end
> +
> + at protocol Invalidation <NSObject>
> +- (void)invalidate __attribute__((annotate("objc_instance_variable_invalidator")));
> + at end
> +
> + at interface Foo : NSObject <Invalidation>
> + at end
> +
> + at class FooBar;
> + at protocol FooBar_Protocol <NSObject>
> + at end
> +
> + at interface MissingInvalidationMethod : Foo <FooBar_Protocol>
> + at property (assign) MissingInvalidationMethod *foobar15_warn; // expected-warning {{No invalidation method defined in the @implementation for MissingInvalidationMethod; Property foobar15_warn needs to be invalidated}}
> + at end
> + at implementation MissingInvalidationMethod
> + at end
> +
> + at interface MissingInvalidationMethod2 : Foo <FooBar_Protocol> {
> +  Foo *Ivar1;// expected-warning {{No invalidation method defined in the @implementation for MissingInvalidationMethod2; Instance variable Ivar1 needs to be invalidated}}
> +}
> + at end
> + at implementation MissingInvalidationMethod2
> + at end
> +
> + at interface MissingInvalidationMethodDecl : NSObject {
> +  Foo *Ivar1;// expected-warning {{No invalidation method declared in the @interface for MissingInvalidationMethodDecl; Instance variable Ivar1 needs to be invalidated}}
> +}
> + at end
> + at implementation MissingInvalidationMethodDecl
> + at end
> +
> + at interface MissingInvalidationMethodDecl2 : NSObject {
> + at private
> +    Foo *_foo1;
> +}
> + at property (strong) Foo *bar1; // expected-warning {{No invalidation method declared in the @interface for MissingInvalidationMethodDecl2; Property bar1 needs to be invalidated}}
> + at end
> + at implementation MissingInvalidationMethodDecl2
> + at end

Hello Anna,

Sorry, but this test fails:

http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/120/steps/check-all/logs/objc_invalidation.m

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list