Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Preprocessor / pragma-comment-elf.c
blob7b84aba51a0daf202da8c136dd26d4afd5d64143
1 // RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple x86_64-scei-ps4
2 // RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple x86_64-sie-ps5
3 // RUN: %clang_cc1 %s -fsyntax-only -verify -fms-extensions -triple i686-unknown-linux-gnu
5 // On ELF targets, issue a diagnostic that pragma comments are ignored except:
6 // #pragma comment lib
8 #pragma comment(lib)
9 #pragma comment(lib,"foo")
10 __pragma(comment(lib, "bar"))
12 #pragma comment(linker) // expected-warning {{'#pragma comment linker' ignored}}
13 #pragma comment(linker,"foo") // expected-warning {{'#pragma comment linker' ignored}}
14 __pragma(comment(linker, " bar=" "2")) // expected-warning {{'#pragma comment linker' ignored}}
16 #pragma comment(user) // expected-warning {{'#pragma comment user' ignored}}
17 #pragma comment(user, "Compiled on " __DATE__ " at " __TIME__ ) // expected-warning {{'#pragma comment user' ignored}}
18 __pragma(comment(user, "foo")) // expected-warning {{'#pragma comment user' ignored}}
20 #pragma comment(compiler) // expected-warning {{'#pragma comment compiler' ignored}}
21 #pragma comment(compiler, "foo") // expected-warning {{'#pragma comment compiler' ignored}}
22 __pragma(comment(compiler, "foo")) // expected-warning {{'#pragma comment compiler' ignored}}
24 #pragma comment(exestr) // expected-warning {{'#pragma comment exestr' ignored}}
25 #pragma comment(exestr, "foo") // expected-warning {{'#pragma comment exestr' ignored}}
26 __pragma(comment(exestr, "foo")) // expected-warning {{'#pragma comment exestr' ignored}}
28 #pragma comment(foo) // expected-error {{unknown kind of pragma comment}}
29 __pragma(comment(foo)) // expected-error {{unknown kind of pragma comment}}