[PATCH] D144626: [C++20] [Modules] Trying to compare the trailing require clause of the primary template when performing ODR checking
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 30 14:53:31 PDT 2023
rsmith added inline comments.
================
Comment at: clang/lib/AST/ASTContext.cpp:6704
+ };
+ const FunctionDecl *PrimaryX = TryToGetPrimaryTemplatedFunction(FuncX);
+ const FunctionDecl *PrimaryY = TryToGetPrimaryTemplatedFunction(FuncY);
----------------
If this is necessary here, I'd expect it to be necessary in a lot of other places too. (For example, we perform basically the same comparison when doing redeclaration checking.) Which declarations have the wrong requires-clause attached to them? Why would the requires-clause be modified from the one written in the original declaration?
(I could imagine this happening for explicit instantiations, where the requires clause might not be specified at all, but we could address that by looking at the canonical declaration for a trailing requires-clause, rather than looking at the template pattern.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144626/new/
https://reviews.llvm.org/D144626
More information about the cfe-commits
mailing list