[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91534 >From 34af5511804b8c0fd8b0d742653f6017dd8e9e87 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 08:43:23 -0400 Subject: [PATCH 1/2] [Clang][Sema] Do not mark template parameters in the

[clang] Reapply "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92283)

2024-05-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/92283 This patch reapplies #90500, addressing a bug which caused binary operators with dependent operands to be incorrectly rebuilt by `TreeTransform`. >From 365d97508883eb5a4f9b898f8277d16e1f6d3862 Mon Sep 17

[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-15 Thread Krystian Stasiowski via cfe-commits
@@ -5485,20 +5485,40 @@ static bool isAtLeastAsSpecializedAs(Sema , SourceLocation Loc, switch (TPOC) { case TPOC_Call: for (unsigned I = 0, N = Args2.size(); I != N; ++I) - ::MarkUsedTemplateParameters(S.Context, Args2[I], false, -

[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-15 Thread Krystian Stasiowski via cfe-commits
@@ -5485,20 +5485,40 @@ static bool isAtLeastAsSpecializedAs(Sema , SourceLocation Loc, switch (TPOC) { case TPOC_Call: for (unsigned I = 0, N = Args2.size(); I != N; ++I) - ::MarkUsedTemplateParameters(S.Context, Args2[I], false, -

[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/91393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: The issue seems to be that `TreeTransform::RebuildCXXOperatorCallExpr` relies on `isOverloadableType` to always be true for dependent types https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Well this took forever to reduce: ```cpp template struct A; template bool operator==(const A&, const A&); template void f(int *x) { [&](auto *y) { return x == y; }; } void g() { f(nullptr); } ``` We initially build a `CXXOperatorCallExpr` during parsing for the

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Reverted in #92149 https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92149)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/92149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92149)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92149 >From 55a5910281b9f6e150adc29b3a1b9c149ca0ef55 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 14 May 2024 13:17:29 -0400 Subject: [PATCH] Revert "[Clang][Sema] Earlier type checking for builtin

[clang] Revert "[Clang][Sema] Earlier type checking for builtin unary operators (#90500)" (PR #92149)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/92149 This reverts commit 8019cc94658d133583f7be6cd0023d30b0f3. >From a55eb47a72fd6b5d703e7c20e2cbf5b2aa7fd78d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 14 May 2024 13:17:29 -0400 Subject:

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: This seems to [break something](https://lab.llvm.org/buildbot/#/builders/121/builds/41631) in LLVM... investigating https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane Since I addressed @shafik's comments, it this good to be merged? https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-14 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/92113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-13 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @eaeltsin @ilya-biryukov Fixed in 596a9c1f9b3179b3c77cbde1e96619292ce2a10a https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Fix bug where operator-> typo corrects in the current instantiation (PR #91972)

2024-05-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/91972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix bug where operator-> typo corrects in the current instantiation (PR #91972)

2024-05-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91972 >From a013806c0199e260c37bc6b16b600e61e4caa1c9 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 13 May 2024 10:22:04 -0400 Subject: [PATCH 1/2] [Clang][Sema] Fix bug where operator-> typo

[clang] [Clang][Sema] Fix bug where operator-> typo corrects in the current instantiation (PR #91972)

2024-05-13 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > I think this needs a release note? I know the only case we have right now is > because of your other patch, but perhaps this affects elsewhere too? @erichkeane I don't think we need a release note since the code changes are in `LookupMemberExpr`, which prior to #90152 had

[clang] [Clang][Sema] Fix bug where operator-> typo corrects in the current instantiation (PR #91972)

2024-05-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/91972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix bug where operator-> typo corrects in the current instantiation (PR #91972)

2024-05-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91972 >From a013806c0199e260c37bc6b16b600e61e4caa1c9 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 13 May 2024 10:22:04 -0400 Subject: [PATCH] [Clang][Sema] Fix bug where operator-> typo corrects in

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-13 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @ilya-biryukov See #91972 https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix bug where operator-> typo corrects in the current instantiation (PR #91972)

2024-05-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/91972 Fixes [this bug](https://github.com/llvm/llvm-project/pull/90152#issuecomment-2107363977) introduced in #90152. This bug occurs when typo-correction attempts to fix a reference to a non-existent member of

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-13 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @ilya-biryukov I can fix this quickly (less than an hour). https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-13 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Repro: ```cpp template struct Typo { Typo(const Typo& t) { t->typo; // error t->Typp; // error t->Tzpo; // error t->ty; // ok } }; ``` https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-13 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @ilya-biryukov Actually, that is an incredibly useful piece of information :) I think this is an issue with type correction... https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

2024-05-10 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @adrian-prantl I tested this patch locally and it fixes the crash in LLDB https://github.com/llvm/llvm-project/pull/91393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-09 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @dyung Per [[temp.dep.type] p10.11](http://eel.is/c++draft/temp.dep.type#10.11): > A type is dependent if it is > - [...] > - denoted by a _simple-template-id_ in which either the template name is a > template parameter or any of the template arguments is a dependent type or

[clang] [Clang][Sema] Revert changes to operator= lookup in templated classes from #91498, #90999, and #90152 (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/91620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Revert changes to operator= lookup in templated classes from #91498, #90999, and #90152 (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91620 >From 7b2f3da17dfc93a4f0aa69ad4da90707b6f2e8b6 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 9 May 2024 12:30:28 -0400 Subject: [PATCH 1/3] Revert "[Clang][Sema] Fix lookup of dependent

[clang] [Clang][Sema] Revert changes to operator= lookup in templated classes from #91498, #90999, and #90152 (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/91620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Revert changes to operator= lookup in templated classes from #91498, #90999, and #90152 (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/91620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (#91498)" (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91620 >From 7b2f3da17dfc93a4f0aa69ad4da90707b6f2e8b6 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 9 May 2024 12:30:28 -0400 Subject: [PATCH 1/3] Revert "[Clang][Sema] Fix lookup of dependent

[clang] Revert "[Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (#91498)" (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91620 >From 7b2f3da17dfc93a4f0aa69ad4da90707b6f2e8b6 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 9 May 2024 12:30:28 -0400 Subject: [PATCH 1/4] Revert "[Clang][Sema] Fix lookup of dependent

[clang] Revert "[Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (#91498)" (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Is it alright to partially revert commits in a single PR? If so, I'm just going to revert all the `operator=` related changes from #91498, #90999, and #90152. https://github.com/llvm/llvm-project/pull/91620 ___ cfe-commits mailing

[clang] Revert "[Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (#91498)" (PR #91620)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/91620 This reverts commit 62b5b61f436add042d8729dc9837d055613180d9 (#91498). >From 7b2f3da17dfc93a4f0aa69ad4da90707b6f2e8b6 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 9 May 2024 12:30:28 -0400

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @aeubanks I think I'm going to revert this & maybe partially revert the changes in #90152 which cause `operator=` to be treated as a dependent name when the current class is templated. There are lots of edge cases that need to be accounted for. Thoughts @erichkeane ?

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-09 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @glandium I've reduced it to the following: ```cpp template struct A { static constexpr bool B = true; }; template struct C { }; template struct D { C::B> f(); }; template auto D::f() -> C::B> { } ``` The problem is that we build a `DependentScopeDeclRefExpr` for

[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane Release note added https://github.com/llvm/llvm-project/pull/91534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91534 >From eea39228271166b4d8f39b32d7866cb33dffdd0b Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 08:43:23 -0400 Subject: [PATCH 1/2] [Clang][Sema] Do not mark template parameters in the

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91503 >From 163c22df80a5e8c753ded0d5cf5e909553477059 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:59:24 -0400 Subject: [PATCH 1/3] [Clang][Sema] Fix lookup of dependent operator=

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/91498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91498 >From 60d2030216403c7cfa8272396497d31aed314288 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:18:49 -0400 Subject: [PATCH 1/5] [Clang][Sema] Fix lookup of dependent operator=

[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
@@ -5485,20 +5485,40 @@ static bool isAtLeastAsSpecializedAs(Sema , SourceLocation Loc, switch (TPOC) { case TPOC_Call: for (unsigned I = 0, N = Args2.size(); I != N; ++I) - ::MarkUsedTemplateParameters(S.Context, Args2[I], false, -

[clang] [Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering (PR #91534)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/91534 We do not deduce template arguments from the exception specification when determining the primary template of a function template specialization or when taking the address of a function template. Therefore,

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91498 >From 60d2030216403c7cfa8272396497d31aed314288 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:18:49 -0400 Subject: [PATCH 1/5] [Clang][Sema] Fix lookup of dependent operator=

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
@@ -137,17 +137,16 @@ namespace InhCtor { int n = b.T(); // expected-error {{'T' is a protected member of 'InhCtor::A'}} // expected-note@-15 {{declared protected here}} - // FIXME: EDG and GCC reject this too, but it's not clear why it would be - //

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91498 >From 60d2030216403c7cfa8272396497d31aed314288 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:18:49 -0400 Subject: [PATCH 1/4] [Clang][Sema] Fix lookup of dependent operator=

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
@@ -1269,19 +1269,19 @@ struct FindLocalExternScope { }; } // end anonymous namespace +static bool isDependentAssignmentOperator(DeclarationName Name, + DeclContext *LookupContext) { + auto *LookupRecord =

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
@@ -1269,19 +1269,19 @@ struct FindLocalExternScope { }; } // end anonymous namespace +static bool isDependentAssignmentOperator(DeclarationName Name, + DeclContext *LookupContext) { + auto *LookupRecord =

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91503 >From fd4172e64384379a7c976c4ce597eac629bc111f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:59:24 -0400 Subject: [PATCH 1/3] [Clang][Sema] Fix lookup of dependent operator=

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91503 >From fd4172e64384379a7c976c4ce597eac629bc111f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:59:24 -0400 Subject: [PATCH 1/2] [Clang][Sema] Fix lookup of dependent operator=

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91498 >From 60d2030216403c7cfa8272396497d31aed314288 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:18:49 -0400 Subject: [PATCH 1/2] [Clang][Sema] Fix lookup of dependent operator=

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @alexfh see #91503 https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91503 >From fd4172e64384379a7c976c4ce597eac629bc111f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 8 May 2024 12:59:24 -0400 Subject: [PATCH] [Clang][Sema] Fix lookup of dependent operator= named by

[clang] [Clang][Sema] Fix lookup of dependent operator= named by using-declaration (PR #91503)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/91503 Fixes [this bug](https://github.com/llvm/llvm-project/pull/90152#issuecomment-2100932093) caused by #90152. Will add tests shortly. >From 60d2030216403c7cfa8272396497d31aed314288 Mon Sep 17 00:00:00 2001

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @alexfh It won't fix the example in your comment (but I have a separate fix for it) https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @bgra8 see #91498 https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/91498 Fixes [this crash](https://github.com/llvm/llvm-project/pull/90152#issuecomment-2100688849) caused by #90152. Will add tests shortly. >From 60d2030216403c7cfa8272396497d31aed314288 Mon Sep 17 00:00:00 2001

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Looks like `ActOnDependentIdExpression` tries to build a `DependentScopeDeclRefExpr`, which fails because `BuildDependentDeclRefExpr` returns `ExprError()` if no qualifier is present. I'll open a PR shortly. https://github.com/llvm/llvm-project/pull/90152

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @bgra8 Reduced to ```cpp template struct A { template auto f(U u) -> decltype(operator=(u)); }; template struct A; ``` Seems like `f` is being set as invalid without any diagnostic... I think I can fix this quickly https://github.com/llvm/llvm-project/pull/90152

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @shafik https://github.com/llvm/llvm-project/pull/90500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/88963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 5957a414940e4b113eb4ae7db65a36bfb332b8d4 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 01/11] [Clang][Sema] Improve support for explicit

[clang] [clang-tools-extra] [Clang][Sema] Don't set instantiated from function when rewriting operator<=> (PR #91339)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/91339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang][Sema] Don't set instantiated from function when rewriting operator<=> (PR #91339)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91339 >From 715406a9188129dafef18674e4a5870e17dba8c5 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 7 May 2024 10:07:26 -0400 Subject: [PATCH 1/6] [Clang][Sema] Don't set instantiated from function

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/90760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @adrian-prantl While I'm not 100% certain of this, I _think_ modules are cached between test runs for LLDB (the only way I was able to reproduce the crash was by precompiling modules with clang built from the commit before this one, and then deserializing with clang built

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: This seems to cause a crash in lldb in `ClassTemplateSpecializationDecl::getSourceRange()`... investigating https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90760 >From e5e0f25de3307128914b6fcfc9223b389e7b6438 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 1 May 2024 10:54:12 -0400 Subject: [PATCH 1/5] [Clang][Sema] Explicit template arguments are not

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90760 >From e5e0f25de3307128914b6fcfc9223b389e7b6438 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 1 May 2024 10:54:12 -0400 Subject: [PATCH 1/5] [Clang][Sema] Explicit template arguments are not

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 01/11] [Clang][Sema] Improve support for explicit

[clang] [clang-tools-extra] [Clang][Sema] Don't set instantiated from function when rewriting operator<=> (PR #91339)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91339 >From b199345e93410ad4e7f7f4b37f09c7e66572d43a Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 7 May 2024 10:07:26 -0400 Subject: [PATCH 1/6] [Clang][Sema] Don't set instantiated from function

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 01/10] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/9] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane I added two release notes (one for the bug fix to constraint substitution, and one for allowing explicit specializations of constrained member functions). https://github.com/llvm/llvm-project/pull/88963 ___

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/8] [Clang][Sema] Improve support for explicit

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
@@ -111,6 +111,13 @@ Clang Frontend Potentially Breaking Changes $ clang --target= -print-target-triple +- The ``getTypeAsWritten`` member function has been removed from ``ClassTemplateSpecializationDecl`` and + ``VarTemplateSpecializationDecl``, and a new member

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
@@ -111,6 +111,13 @@ Clang Frontend Potentially Breaking Changes $ clang --target= -print-target-triple +- The ``getTypeAsWritten`` member function has been removed from ``ClassTemplateSpecializationDecl`` and + ``VarTemplateSpecializationDecl``, and a new member

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Oh, forgot about the release note :) I'll add one https://github.com/llvm/llvm-project/pull/88963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: There is a crash that occurs in the clang-tidy test suite. It will go away once #91339 is merged (I plan to merge that first). This will also fix #90349. https://github.com/llvm/llvm-project/pull/88963 ___ cfe-commits mailing list

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/7] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Don't set instantiated from function when rewriting operator<=> (PR #91339)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91339 >From b199345e93410ad4e7f7f4b37f09c7e66572d43a Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 7 May 2024 10:07:26 -0400 Subject: [PATCH 1/5] [Clang][Sema] Don't set instantiated from function

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/8] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Don't set instantiated from function when rewriting operator<=> (PR #91339)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/91339 >From b199345e93410ad4e7f7f4b37f09c7e66572d43a Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 7 May 2024 10:07:26 -0400 Subject: [PATCH 1/4] [Clang][Sema] Don't set instantiated from function

[clang] [Clang][Sema] Don't set instantiated from function when rewriting operator<=> (PR #91339)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/91339 The following snippet causes a crash: ```cpp template struct A { bool operator<=>(const A&) const requires true = default; }; bool f(A a) { return a != A(); } ``` This occurs because during the

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/8] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From 01db101ca28f26181dfedeaef1ec49a5ae42ee99 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/7] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-07 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From bcffb80bba2a6f9ce9eddad61b99a3e59a58f8a0 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/7] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90760 >From a30530b4de31fab70911cb7b51e7a7e274fd2a38 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 1 May 2024 10:54:12 -0400 Subject: [PATCH 1/4] [Clang][Sema] Explicit template arguments are not

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @AaronBallman release note added (feel free to suggest any changes to it :)) https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
@@ -764,9 +764,9 @@ AST_POLYMORPHIC_MATCHER(isImplicit, return Node.isImplicit(); } -/// Matches classTemplateSpecializations, templateSpecializationType and -/// functionDecl that have at least one TemplateArgument matching the given -/// InnerMatcher. +/// Matches

[clang] [Clang][Sema] Earlier type checking for builtin unary operators (PR #90500)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90500 >From 68ae8a9321b96da8cde1a1813d5e2b0c352649b7 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 25 Apr 2024 08:17:21 -0400 Subject: [PATCH 1/4] [Clang][Sema] Earlier type checking for builtin

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From bcffb80bba2a6f9ce9eddad61b99a3e59a58f8a0 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/6] [Clang][Sema] Improve support for explicit

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @AaronBallman https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Improve support for explicit specializations of constrained member functions & member function templates (PR #88963)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88963 >From bcffb80bba2a6f9ce9eddad61b99a3e59a58f8a0 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 13:36:11 -0400 Subject: [PATCH 1/5] [Clang][Sema] Improve support for explicit

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/90760 >From a30530b4de31fab70911cb7b51e7a7e274fd2a38 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 1 May 2024 10:54:12 -0400 Subject: [PATCH 1/3] [Clang][Sema] Explicit template arguments are not

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

2024-05-06 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Ping @erichkeane https://github.com/llvm/llvm-project/pull/90760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-05-03 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @dyung Yup, that is expected https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   >