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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to