xref: /aosp_15_r20/external/clang/test/Driver/arc.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: not %clang -ObjC -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
2*67e74705SXin Li // RUN: not %clang -x objective-c -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
3*67e74705SXin Li // RUN: not %clang -x objective-c++ -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s
4*67e74705SXin Li // RUN: not %clang -x c -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
5*67e74705SXin Li // RUN: not %clang -x c++ -target i386-apple-darwin10 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s
6*67e74705SXin Li // RUN: not %clang -x objective-c -target x86_64-apple-darwin11 -mmacosx-version-min=10.5 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTSUPPORTED %s
7*67e74705SXin Li 
8*67e74705SXin Li // Just to test clang is working.
9*67e74705SXin Li # foo
10*67e74705SXin Li 
11*67e74705SXin Li // CHECK: error: -fobjc-arc is not supported on platforms using the legacy runtime
12*67e74705SXin Li // CHECK-NOT: invalid preprocessing directive
13*67e74705SXin Li 
14*67e74705SXin Li // NOTOBJC-NOT: error: -fobjc-arc is not supported on platforms using the legacy runtime
15*67e74705SXin Li // NOTOBJC: invalid preprocessing directive
16*67e74705SXin Li 
17*67e74705SXin Li // NOTSUPPORTED: error: -fobjc-arc is not supported on versions of OS X prior to 10.6
18