From b50df911788541fb5e17fe7cf3ce25330101a53a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 13 Oct 2016 23:04:14 +0000 Subject: Reinstate r281429, reverted in r281452, with a fix for its mishandling of compiles without -fmodules-local-submodule-visibility. Original commit message: [modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition. llvm-svn: 284176 --- clang/test/Modules/merge-var-template-def.cpp | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 clang/test/Modules/merge-var-template-def.cpp (limited to 'clang/test/Modules/merge-var-template-def.cpp') diff --git a/clang/test/Modules/merge-var-template-def.cpp b/clang/test/Modules/merge-var-template-def.cpp new file mode 100644 index 00000000000..4d39cad3103 --- /dev/null +++ b/clang/test/Modules/merge-var-template-def.cpp @@ -0,0 +1,7 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -I%S/Inputs/merge-var-template-def -verify -fmodules -Werror=undefined-internal -fmodules-local-submodule-visibility -fmodules-cache-path=%t -fimplicit-module-maps %s +// expected-no-diagnostics + +#include "b2.h" +namespace { struct X; } +void *x = get(); -- cgit v1.2.3