[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Preprocessor / file_name_macro.c
blob9dc9dc5684c554a2e65b6008d1240095ef04b822
1 // RUN: %clang_cc1 -E %s -I%S/Inputs | FileCheck -strict-whitespace %s
2 // RUN: %clang_cc1 -fms-compatibility -DMS -E %s -I%S/Inputs | FileCheck -check-prefix=CHECK-MS -strict-whitespace %s
3 // RUN: %clang_cc1 -E %s -I%S/Inputs -DBADINC -verify
5 #ifdef BADINC
7 // Paranoia.
9 __FILE_NAME__
10 #include <include-subdir/> // expected-error {{file not found}}
11 __FILE_NAME__
13 #else
15 // Reference.
16 1: "file_name_macro.c"
18 // Ensure it expands correctly for this file.
19 2: __FILE_NAME__
21 // CHECK: {{^}}1: "file_name_macro.c"
22 // CHECK: {{^}}2: "file_name_macro.c"
24 // Test if inclusion works right.
25 #ifdef MS
26 #include <include-subdir\file_name_macro_include.h>
27 // MS compatibility allows for mixed separators in paths.
28 #include <include-subdir/subdir1\hdr1.h>
29 #include <include-subdir\subdir1/hdr2.h>
30 #else
31 #include <include-subdir/file_name_macro_include.h>
32 #endif
34 #include <include-subdir/h>
36 // CHECK: {{^}}3: "file_name_macro_include.h"
37 // CHECK: {{^}}4: "file_name_macro_include.h"
38 // CHECK-NOT: {{^}}5: "file_name_macro_include.h"
39 // CHECK-MS: {{^}}5: "file_name_macro_include.h"
40 // CHECK: {{^}}6: "h"
41 // CHECK-MS: {{^}}7: "hdr1.h"
42 // CHECK-MS: {{^}}8: "hdr2.h"
44 #endif