| // We need '-fmodules-local-submodule-visibility' to properly test merging when building a module from multiple |
| // headers inside the same TU. C++20 mode would imply this flag, but we need it to set it explicitly for C++14. |
| // RUN: %clang_cc1 -xc++ -std=c++14 -fmodules -fmodules-local-submodule-visibility -fmodule-name=library \ |
| // RUN: -emit-module %t/modules.map \ |
| // RUN: %clang_cc1 -xc++ -std=c++14 -fmodules -fmodules-local-submodule-visibility -fmodule-file=%t/module.pcm \ |
| // RUN: -fmodule-map-file=%t/modules.map \ |
| // RUN: -fsyntax-only -verify %t/use.cpp |
| template <class T> constexpr T zero = 0; // expected-error {{redefinition}} expected-note@* {{previous}} |
| template <> constexpr Int zero<Int> = {0}; // expected-error {{redefinition}} expected-note@* {{previous}} |
| template <class T> constexpr T* zero<T*> = nullptr; // expected-error {{redefinition}} expected-note@* {{previous}} |
| template <> constexpr int** zero<int**> = nullptr; // ok, new specialization. |
| template <class T> constexpr T** zero<T**> = nullptr; // ok, new partial specilization. |
| template <class T> constexpr T zero = 0; |
| template <> constexpr int zero<Int> = {0}; |
| template <class T> constexpr T* zero<T*> = nullptr; |
| template <class T> constexpr T zero = 0; |
| template <> constexpr int zero<Int> = {0}; |
| template <class T> constexpr T* zero<T*> = nullptr; |