Debian Codegraph @

clang/test/Modules/no-transitive-macro-change.cpp

raw
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 //
4 // RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header \
5 // RUN: %t/a.h -o %t/a.pcm
6 // RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header \
7 // RUN: %t/b.h -o %t/b.pcm -fmodule-file=%t/a.pcm
8 // RUN: echo "#define A2 44" >> %t/a.h
9 // RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header \
10 // RUN: %t/a.h -o %t/a.v1.pcm
11 // RUN: %clang_cc1 -std=c++20 -emit-header-unit -xc++-user-header \
12 // RUN: %t/b.h -o %t/b.v1.pcm -fmodule-file=%t/a.v1.pcm
13 // RUN: not diff %t/b.pcm %t/b.v1.pcm &> /dev/null
14
15 //--- a.h
16 #pragma once
17 #define A 43
18
19 //--- b.h
20 #pragma once
21 import "a.h";
22 #define B 43
23 const int a = A;