aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Modules/filename.cpp
blob: 7c42a7eddee38ef8d1a0035e37991f8f798fe001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: rm -rf %t
// RUN: split-file %s %t

//--- include/a.h
const char *p = __FILE__;
//--- include/module.modulemap
module "A" { header "a.h" }
//--- src/tu.cpp
#include "a.h"

// RUN: cd %t
// RUN: %clang_cc1 -I ./include -fmodule-name=A -fmodule-map-file=%t/include/module.modulemap %t/src/tu.cpp -E | FileCheck %s

// Make sure that headers that are referenced by module maps have __FILE__
// reflect the include path they were found with. (We make sure they cannot be
// found relative to the includer.)
// CHECK: const char *p = "./include{{/|\\\\}}a.h"