Debian Codegraph @

clang/test/Modules/lazy-by-name-lookup.c

raw
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -I%t \
4 // RUN: -fmodules-cache-path=%t/cache %t/tu.c -fsyntax-only -Rmodule-map \
5 // RUN: -verify
6
7 //--- module.modulemap
8
9 module A {
10 header "A.h"
11 }
12
13 module B {
14 header "B.h"
15 }
16
17 //--- A.h
18
19 //--- B.h
20
21 //--- tu.c
22
23 #pragma clang __debug module_lookup A // does module map search for A
24 #pragma clang __debug module_map A // A is now in the ModuleMap,
25 #pragma clang __debug module_map B // expected-warning{{unknown module 'B'}}
26 // but B isn't.
27 #include <B.h> // Now load B via header search
28
29 // expected-remark@*{{parsing modulemap}}
30 // expected-remark@*{{loading parsed module 'A'}}
31 // expected-remark@*{{loading modulemap}}