You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
677 B

// RUN: %clang_cc1 -std=c++17 -fmodules -verify %s
// expected-no-diagnostics
#pragma clang module build A
module A {}
#pragma clang module contents
#pragma clang module begin A
template<int*> struct X {};
auto get() { static int n; return X<&n>(); }
using A = decltype(get());
#pragma clang module end
#pragma clang module endbuild
#pragma clang module build B
module B {}
#pragma clang module contents
#pragma clang module begin B
template<int*> struct X {};
auto get() { static int n; return X<&n>(); }
using B = decltype(get());
#pragma clang module end
#pragma clang module endbuild
#pragma clang module import A
#pragma clang module import B
using T = A;
using T = B;