[PATCH] D131258: [Sema] Merge variable template specializations
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 7 20:55:40 PDT 2022
ChuanqiXu added inline comments.
================
Comment at: clang/test/Modules/merge-var-template-spec-cxx-modules.cpp:18-23
+template <class T> constexpr T zero = 0; // expected-error-re {{declaration{{.*}}in the global module follows declaration in module var_def}}
+ // expected-note@* {{previous}}
+template <> constexpr Int zero<Int> = {0}; // expected-error-re {{declaration{{.*}}in the global module follows declaration in module var_def}}
+ // expected-note@* {{previous}}
+template <class T> constexpr T* zero<T*> = nullptr; // expected-error-re {{declaration{{.*}}in the global module follows declaration in module var_def}}
+ // expected-note@* {{previous}}
----------------
BTW, these errors are not expected by me since they are not in a named modules and they are in different TU with var_def.cppm.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131258/new/
https://reviews.llvm.org/D131258
More information about the cfe-commits
mailing list