1 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.10.0 -verify -fobjc-exceptions %s
2 // RUN: not %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.10.0 -fdiagnostics-parseable-fixits -fobjc-exceptions %s 2>&1 | FileCheck %s
13 // Provide a fixit when we are parsing a standalone statement
14 @tr { }; // expected-error {{unexpected '@' in program}}
15 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:4-[[@LINE-1]]:6}:"try"
16 @finaly { }; // expected-error {{unexpected '@' in program}}
17 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:4-[[@LINE-1]]:10}:"finally"
18 @autorelpool { }; // expected-error {{unexpected '@' in program}}
19 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:4-[[@LINE-1]]:15}:"autoreleasepool"
21 // Ensure that no fixit is given when parsing expressions
23 id thing = @autoreleasepool { }; // expected-error {{unexpected '@' in program}}
24 (void)@tr { }; // expected-error {{unexpected '@' in program}}
25 bar(@final { }); // expected-error {{unexpected '@' in program}}
26 for(@auto;;) { } // expected-error {{unexpected '@' in program}}
27 [@try]; // expected-error {{unexpected '@' in program}}