xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/pragma-arc-cf-code-audited.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc #pragma clang arc_cf_code_audited foo // expected-error {{expected 'begin' or 'end'}}
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc #pragma clang arc_cf_code_audited begin foo // expected-warning {{extra tokens at end of #pragma directive}}
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc #pragma clang arc_cf_code_audited end
8*f4a2713aSLionel Sambuc #pragma clang arc_cf_code_audited end // expected-error {{not currently inside '#pragma clang arc_cf_code_audited'}}
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc #pragma clang arc_cf_code_audited begin // expected-note {{#pragma entered here}}
11*f4a2713aSLionel Sambuc #pragma clang arc_cf_code_audited begin // expected-error {{already inside '#pragma clang arc_cf_code_audited'}} expected-note {{#pragma entered here}}
12*f4a2713aSLionel Sambuc 
13*f4a2713aSLionel Sambuc #include "Inputs/pragma-arc-cf-code-audited.h" // expected-error {{cannot #include files inside '#pragma clang arc_cf_code_audited'}}
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc // This is actually on the #pragma line in the header.
16*f4a2713aSLionel Sambuc // expected-error@Inputs/pragma-arc-cf-code-audited.h:16 {{'#pragma clang arc_cf_code_audited' was not ended within this file}}
17*f4a2713aSLionel Sambuc 
18*f4a2713aSLionel Sambuc #pragma clang arc_cf_code_audited begin // expected-error {{'#pragma clang arc_cf_code_audited' was not ended within this file}}
19