31 lines · c
1// RUN: rm -rf %t2// RUN: split-file %s %t3// 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: -verify6 7//--- module.modulemap8 9module A {10 header "A.h"11}12 13module B {14 header "B.h"15}16 17//--- A.h18 19//--- B.h20 21//--- tu.c22 23#pragma clang __debug module_lookup A // does module map search for A24#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 search28 29// expected-remark@*{{parsing modulemap}}30// expected-remark@*{{loading parsed module 'A'}}31// expected-remark@*{{loading modulemap}}