[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-07 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Thanks, I reproduced the problem with ``` template class shared_ptr { T* data; }; template class cfftpass { static shared_ptr make_pass(); }; template using Tcpass = shared_ptr>; template Tcpass cfftpass::make_pass() { return Tcpass{};};

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ok, revert is done. @metaflow , please provide the reproducer. https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Please provide one as soon as you can! In the meantime, we should probably > revert @Fznamznon Ok, I'll prepare revert. https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-06 Thread Erich Keane via cfe-commits
erichkeane wrote: > This started to give errors to code previously considere valid with > "out-of-line definition of X differs from that in". Don't have a repro yet. Please provide one as soon as you can! In the meantime, we should probably revert @Fznamznon https://github.com/llvm/llvm-proj

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-06 Thread Mikhail Goncharov via cfe-commits
metaflow wrote: This started to give errors to code previously considere valid with "out-of-line definition of X differs from that in". Don't have a repro yet. https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-06 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/74335 >From 6d7fe6fe8c62373fdaab597c3c31c7132e475e32 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Mon, 4 Dec 2023 07:47:04 -0800 Subject: [PATCH 1/2] [clang] Substitute alias templates from correct c

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this is on the right track, 1 nit, else is right I think. https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-04 Thread Erich Keane via cfe-commits
@@ -3990,9 +3990,14 @@ QualType Sema::CheckTemplateIdType(TemplateName Name, if (Inst.isInvalid()) return QualType(); -CanonType = SubstType(Pattern->getUnderlyingType(), - TemplateArgLists, AliasTemplate->getLocation(), -

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/74335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes Current context set to where alias was met, not where it is declared caused incorrect access check in case alias referenced private members of the parent class. Fixes https://github.com/llvm/llvm

[clang] [clang] Substitute alias templates from correct context (PR #74335)

2023-12-04 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/74335 Current context set to where alias was met, not where it is declared caused incorrect access check in case alias referenced private members of the parent class. Fixes https://github.com/llvm/llvm-project/issu