brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 14577f1 Raw
35 lines · cpp
1// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility %s -verify -Werror=undefined-inline2 3#pragma clang module build A14module A1 { export * }5#pragma clang module contents6#pragma clang module begin A17template<typename T> class A {};8template<typename T> inline bool f(const A<T>&) { return T::error; }9#pragma clang module end10#pragma clang module endbuild11 12#pragma clang module build A213module A2 { export * }14#pragma clang module contents15#pragma clang module begin A216#pragma clang module load A117template<typename T> class A {};18template<typename T> inline bool f(const A<T>&) { return T::error; }19#pragma clang module end20#pragma clang module endbuild21 22#pragma clang module build A323module A3 { export * }24#pragma clang module contents25#pragma clang module begin A326template<typename T> class A {};27template<typename T> inline bool f(const A<T>&) { return T::error; }28#pragma clang module end29#pragma clang module endbuild30 31#pragma clang module load A332#pragma clang module import A233// expected-error@* {{cannot be used prior to}}34bool y(A<int> o) { return f(o); } // expected-note {{instantiation of}}35