3 // RUN: split-file %s %t
5 // We need '-fmodules-local-submodule-visibility' to properly test merging when building a module from multiple
6 // headers inside the same TU. C++20 mode would imply this flag, but we need it to set it explicitly for C++14.
8 // RUN: %clang_cc1 -xc++ -std=c++14 -fmodules -fmodules-local-submodule-visibility -fmodule-name=library \
9 // RUN: -emit-module %t/modules.map \
10 // RUN: -o %t/module.pcm
13 // RUN: %clang_cc1 -xc++ -std=c++14 -fmodules -fmodules-local-submodule-visibility -fmodule-file=%t/module.pcm \
14 // RUN: -fmodule-map-file=%t/modules.map \
15 // RUN: -fsyntax-only -verify %t/use.cpp
23 auto bar
= zero
<int*>;
26 template <class T
> constexpr T zero
= 0; // expected-error {{redefinition}} expected-note@* {{previous}}
27 template <> constexpr Int zero
<Int
> = {0}; // expected-error {{redefinition}} expected-note@* {{previous}}
28 template <class T
> constexpr T
* zero
<T
*> = nullptr; // expected-error {{redefinition}} expected-note@* {{previous}}
30 template <> constexpr int** zero
<int**> = nullptr; // ok, new specialization.
31 template <class T
> constexpr T
** zero
<T
**> = nullptr; // ok, new partial specilization.
50 template <class T
> constexpr T zero
= 0;
54 template <> constexpr int zero
<Int
> = {0};
55 template <class T
> constexpr T
* zero
<T
*> = nullptr;
63 template <class T
> constexpr T zero
= 0;
67 template <> constexpr int zero
<Int
> = {0};
68 template <class T
> constexpr T
* zero
<T
*> = nullptr;