1// RUN: rm -rf %t
2// RUN: pp-trace -callbacks '*,-FileChanged,-MacroDefined' %s -- -x objective-c++ -undef -target x86_64 -std=c++11 -fmodules -fcxx-modules -fmodules-cache-path=%t -I%S -I%S/Input | FileCheck --strict-whitespace %s
3
4// CHECK: ---
5
6@import Level1A;
7
8// CHECK-NEXT: - Callback: moduleImport
9// CHECK-NEXT: ImportLoc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:[[@LINE-3]]:2"
10// CHECK-NEXT: Path: [{Name: Level1A, Loc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:[[@LINE-4]]:9"}]
11// CHECK-NEXT: Imported: Level1A
12
13@import Level1B.Level2B;
14
15// CHECK-NEXT: - Callback: moduleImport
16// CHECK-NEXT: ImportLoc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:[[@LINE-3]]:2"
17// CHECK-NEXT: Path: [{Name: Level1B, Loc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:[[@LINE-4]]:9"}, {Name: Level2B, Loc: "{{.*}}{{[/\\]}}pp-trace-modules.cpp:[[@LINE-4]]:17"}]
18// CHECK-NEXT: Imported: Level2B
19// CHECK-NEXT: - Callback: EndOfMainFile
20// CHECK-NEXT: ...
21

source code of clang-tools-extra/test/pp-trace/pp-trace-modules.cpp