llvm-project/clang/test/Modules/missing-framework-header.cpp
Iain Sandoe a2dd6130d4 [clang][Modules] Fix a regression in handling missing framework headers.
The commit of af2d11b1d5c1508b506825df460656e0151cd3b0 missed a case where
the value of a suggested module needed to be reset to nullptr.  Fixed thus
and added a testcase to cover the circumstance.
2022-08-19 09:13:22 +01:00

28 lines
669 B
C++

// RUN: rm -rf %t && mkdir %t
// RUN: split-file %s %t
//--- frameworks/FW.framework/Modules/module.modulemap
framework module FW {
umbrella header "FW.h"
module * { export * }
}
//--- frameworks/FW.framework/Headers/FW.h
#include "One.h"
//--- frameworks/FW.framework/Headers/One.h
//--- frameworks/FW.framework/Headers/Two.h
//--- module.modulemap
module Mod { header "Mod.h" }
//--- Mod.h
#include "FW/Two.h"
//--- from_module.m
#include "Mod.h"
// RUN: %clang -fmodules -fmodules-cache-path=%t/cache \
// RUN: -iframework %t/frameworks -c %t/from_module.m -o %t/from_module.o \
// RUN: 2>&1 | FileCheck %s
// CHECK: warning: missing submodule 'FW.Two'