Add PR check to suggest alternatives to using undef (#118506)
[llvm-project.git] / clang / test / Modules / filename.cpp
blob7c42a7eddee38ef8d1a0035e37991f8f798fe001
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
4 //--- include/a.h
5 const char *p = __FILE__;
6 //--- include/module.modulemap
7 module "A" { header "a.h" }
8 //--- src/tu.cpp
9 #include "a.h"
11 // RUN: cd %t
12 // RUN: %clang_cc1 -I ./include -fmodule-name=A -fmodule-map-file=%t/include/module.modulemap %t/src/tu.cpp -E | FileCheck %s
14 // Make sure that headers that are referenced by module maps have __FILE__
15 // reflect the include path they were found with. (We make sure they cannot be
16 // found relative to the includer.)
17 // CHECK: const char *p = "./include{{/|\\\\}}a.h"