Home | History | Annotate | Download | only in Preprocessor
      1 // RUN: %clang_cc1 %s -triple x86_64-scei-ps4 -fsyntax-only -verify -fms-extensions
      2 
      3 // On PS4, issue a diagnostic that pragma comments are ignored except:
      4 //   #pragma comment lib
      5 
      6 #pragma comment(lib)
      7 #pragma comment(lib,"foo")
      8 __pragma(comment(lib, "bar"))
      9 
     10 #pragma comment(linker) // expected-warning {{'#pragma comment linker' ignored}}
     11 #pragma comment(linker,"foo") // expected-warning {{'#pragma comment linker' ignored}}
     12 __pragma(comment(linker, " bar=" "2")) // expected-warning {{'#pragma comment linker' ignored}}
     13 
     14 #pragma comment(user) // expected-warning {{'#pragma comment user' ignored}}
     15 #pragma comment(user, "Compiled on " __DATE__ " at " __TIME__ ) // expected-warning {{'#pragma comment user' ignored}}
     16 __pragma(comment(user, "foo")) // expected-warning {{'#pragma comment user' ignored}}
     17 
     18 #pragma comment(compiler) // expected-warning {{'#pragma comment compiler' ignored}}
     19 #pragma comment(compiler, "foo") // expected-warning {{'#pragma comment compiler' ignored}}
     20 __pragma(comment(compiler, "foo")) // expected-warning {{'#pragma comment compiler' ignored}}
     21 
     22 #pragma comment(exestr) // expected-warning {{'#pragma comment exestr' ignored}}
     23 #pragma comment(exestr, "foo") // expected-warning {{'#pragma comment exestr' ignored}}
     24 __pragma(comment(exestr, "foo")) // expected-warning {{'#pragma comment exestr' ignored}}
     25 
     26 #pragma comment(foo)    // expected-error {{unknown kind of pragma comment}}
     27 __pragma(comment(foo))  // expected-error {{unknown kind of pragma comment}}
     28