// RUN: cp %s %t // RUN: %clang_cc1 -pedantic -fixit -x objective-c %t // RUN: %clang_cc1 -pedantic -verify -x objective-c %t /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the warnings will be fixed by -fixit, and the resulting file should compile cleanly with -Werror -pedantic. */ @protocol X; void foo() { *P; // should be fixed to 'id'. } @class A; @class NSString; @interface Test - (void)test:(NSString *)string; @property (copy) NSString *property; @end void g(NSString *a); void h(id a); void f(Test *t) { NSString *a = "Foo"; id b = "Foo"; A* c = "Foo"; // expected-warning {{incompatible pointer types initializing 'A *' with an expression of type 'char [4]'}} g("Foo"); h("Foo"); h(("Foo")); [t test:"Foo"]; t.property = "Foo"; }