brintos

brintos / llvm-project-archived public Read only

0
0
Text · 893 B · ac4c951 Raw
24 lines · cpp
1// RUN: rm -rf %t2// RUN: %clang_cc1 -fmodules -fmodule-map-file=%S/Inputs/merge-class-definition-visibility/modmap \3// RUN:            -I%S/Inputs/merge-class-definition-visibility \4// RUN:            -fmodules-cache-path=%t %s -verify \5// RUN:            -fmodules-local-submodule-visibility6// expected-no-diagnostics7 8#include "c.h"9template<typename T> struct X { T t; };10typedef X<A> XA;11struct B;12 13#include "e.h"14// Ensure that this triggers the import of the second definition from e.h,15// which is necessary to make the definition of A visible in the template16// instantiation.17XA xa;18 19// Ensure that we make the definition of B visible. We made the parse-merged20// definition from e.h visible, which makes the definition from d.h visible,21// and that definition was merged into the canonical definition from b.h,22// so that becomes visible, and we have a visible definition.23B b;24