From e70dadd67b0d1e7db10ef8d0cda711f10bfd7768 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 10 Jul 2015 22:27:17 +0000 Subject: [modules] When checking the include guard for a header, check whether it's visible in the module we're considering entering. Previously we assumed that if we knew the include guard for a modular header, we'd already parsed it, but that need not be the case if a header is present in the current module and one of its dependencies; the result of getting this wrong was that the current module's submodule for the header would end up empty. llvm-svn: 241953 --- clang/test/Modules/multiple-include.cpp | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 clang/test/Modules/multiple-include.cpp (limited to 'clang/test/Modules/multiple-include.cpp') diff --git a/clang/test/Modules/multiple-include.cpp b/clang/test/Modules/multiple-include.cpp new file mode 100644 index 00000000000..7cbeefc8178 --- /dev/null +++ b/clang/test/Modules/multiple-include.cpp @@ -0,0 +1,5 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -I%S/Inputs/multiple-include -fmodules-cache-path=%t -fimplicit-module-maps -verify %s -fmodules-local-submodule-visibility +// expected-no-diagnostics +#include "b.h" +int c = get(); -- cgit v1.2.3