28 lines · cpp
1// RUN: %clang_cc1 -std=c++17 -fmodules -verify %s2// expected-no-diagnostics3 4#pragma clang module build A5module A {}6#pragma clang module contents7#pragma clang module begin A8template<int*> struct X {};9auto get() { static int n; return X<&n>(); }10using A = decltype(get());11#pragma clang module end12#pragma clang module endbuild13 14#pragma clang module build B15module B {}16#pragma clang module contents17#pragma clang module begin B18template<int*> struct X {};19auto get() { static int n; return X<&n>(); }20using B = decltype(get());21#pragma clang module end22#pragma clang module endbuild23 24#pragma clang module import A25#pragma clang module import B26using T = A;27using T = B;28