[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / attr-external-source-symbol.c
blobf6d0e0649f035e27c178157279b8b16015626214
1 // RUN: %clang_cc1 -fsyntax-only -fblocks -verify -fdouble-square-bracket-attributes %s
3 void threeClauses(void) __attribute__((external_source_symbol(language="Swift", defined_in="module", generated_declaration)));
5 void twoClauses(void) __attribute__((external_source_symbol(language="Swift", defined_in="module")));
7 void fourClauses(void) __attribute__((external_source_symbol(language="Swift", defined_in="module", generated_declaration, generated_declaration))); // expected-error {{duplicate 'generated_declaration' clause in an 'external_source_symbol' attribute}}
9 void oneClause(void) __attribute__((external_source_symbol(generated_declaration)));
11 void noArguments(void)
12 __attribute__((external_source_symbol)); // expected-error {{'external_source_symbol' attribute takes at least 1 argument}}
14 void namedDeclsOnly(void) {
15 int (^block)(void) = ^ (void)
16 __attribute__((external_source_symbol(language="Swift"))) { // expected-warning {{'external_source_symbol' attribute only applies to named declarations}}
17 return 1;
21 [[clang::external_source_symbol(language="Swift", defined_in="module", generated_declaration)]] void threeClauses2(void);
23 [[clang::external_source_symbol(language="Swift", defined_in="module")]] void twoClauses2(void);
25 [[clang::external_source_symbol(language="Swift", defined_in="module", generated_declaration, generated_declaration)]] // expected-error {{duplicate 'generated_declaration' clause in an 'external_source_symbol' attribute}}
26 void fourClauses2(void);
28 [[clang::external_source_symbol(generated_declaration)]] void oneClause2(void);
30 [[clang::external_source_symbol]] // expected-error {{'external_source_symbol' attribute takes at least 1 argument}}
31 void noArguments2(void);