[PATCH] D118034: [C++20] [Modules] Don't complain about duplicated default template argument across modules

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 26 01:23:44 PST 2022


ChuanqiXu planned changes to this revision.
ChuanqiXu added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplate.cpp:2852
 
-    if (RedundantDefaultArg) {
+    if (RedundantDefaultArg && !IsOldParamFromModule) {
       // C++ [temp.param]p12:
----------------
urnathan wrote:
> Yes, I think this is a better place for the comment.  If there are duplicates we need to check they are the same -- pedantically the same tokens, but at least AST equivalence?
Yeah, it should be necessary to check the ODR. I found it is not trivial to do so. It needs more work. I sent https://reviews.llvm.org/D118223 as a forward patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118034/new/

https://reviews.llvm.org/D118034



More information about the cfe-commits mailing list