[clang] [clang] Reapply Handle templated operators with reversed arguments (PR #72213)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 05:40:59 PST 2023
================
@@ -10088,9 +10088,13 @@ static bool allowAmbiguity(ASTContext &Context, const FunctionDecl *F1,
const FunctionDecl *F2) {
if (declaresSameEntity(F1, F2))
return true;
- if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation() &&
- declaresSameEntity(F1->getPrimaryTemplate(), F2->getPrimaryTemplate())) {
- return true;
+ if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation()) {
+ auto PT1 = F1->getPrimaryTemplate();
+ auto PT2 = F2->getPrimaryTemplate();
+ if (declaresSameEntity(PT1, PT2) ||
----------------
ilya-biryukov wrote:
Also, I believe the crashes [here](https://buildkite.com/llvm-project/clang-ci/builds/6710#018bcc9e-fdcb-44f8-802e-f5e98303916c) are related: `getCommonPtr()` that you see in the stack trace is called by `getInstantiatedFromMemberTemplate()`.
https://github.com/llvm/llvm-project/pull/72213
More information about the cfe-commits
mailing list