[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-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 https://lists.llvm.org/cgi-bin/mailman/listin

[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 Fr

[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-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= 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= outsi

[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= named

[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= named

[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 = dyn_cast_if_present(LookupCon

[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 = dyn_cast_if_present(LookupCon

[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= outsi

[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 - // ill-

[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= outsi

[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, t

[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 &S, 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] 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= outsi

[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= 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= named

[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] 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] 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 `A::

[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 ? https:/

[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 Su

[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 l

[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 operato

[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 operato

[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] [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 operato

[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-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 a

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[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 ht

[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 list

[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][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 t

[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 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][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
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 n

[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 corrects

[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-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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[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][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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[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: 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 https://list

[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] 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 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] [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] [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 compar

[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 cfe-commits@list

[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] 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 &S, 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 &S, SourceLocation Loc, switch (TPOC) { case TPOC_Call: for (unsigned I = 0, N = Args2.size(); I != N; ++I) - ::MarkUsedTemplateParameters(S.Context, Args2[I], false, -

[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 00:

[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
sdkrystian wrote: All the new changes are in 5ce0e969f3f94e9694545fe71b14fd8eb086f33e https://github.com/llvm/llvm-project/pull/92283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/92318 According to [[expr.prim.id.general] p2](http://eel.is/c++draft/expr.prim.id.general#2): > If an _id-expression_ `E` denotes a non-static non-type member of some class > `C` at a point where the current class

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-15 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92318 >From a5ed54f967e4a15a80f41ee648f79e77202906d8 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 15 May 2024 16:13:03 -0400 Subject: [PATCH 1/2] [Clang][Sema] Don't build CXXDependentScopeMemberExp

[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 closed 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] 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 closed https://github.com/llvm/llvm-project/pull/92283 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92318 >From 6c8646dbb04cc5898fe7f67c9923036b2f68b56d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 15 May 2024 16:13:03 -0400 Subject: [PATCH 1/3] [Clang][Sema] Don't build CXXDependentScopeMemberExp

[clang] [clang] visit constraint of NTTP (PR #91842)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I don't think this is the right approach. I stepped though the example and the reason we reject is because: - We substitute a dependent `AutoType` in for the types of the template parameters when they are initially built. - We call `getMoreSpecialized` determine whether the pa

[clang] [clang] visit constraint of NTTP (PR #91842)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > Yeah, that seems incredibly reasonable and a much lower touch here with fewer > concerns about the side-effects that we got here. Should I open a PR then? https://github.com/llvm/llvm-project/pull/91842 ___ cfe-commits mailing lis

[clang] [Clang] Properly set the value category of dependent unary operators (PR #88740)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @cor3ntin I believe this causes the crash reported in #92275 https://github.com/llvm/llvm-project/pull/88740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/92425 When the argument passed to `ASTContext::getUnconstrainedType` is an unconstrained `AutoType`, will return the argument unchanged. However, when called with a constrained `AutoType`, an unconstrained, non-dep

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

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

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92425 >From c26365ef78366b5c200d085ddc4211db1b2054e0 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 10:59:03 -0400 Subject: [PATCH] [Clang][Sema] ASTContext::getUnconstrainedType propagate

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

2024-05-16 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @Caslyn [[expr.prim.this] p3](http://eel.is/c++draft/expr.prim.this#3) states: > [...] the expression this is a prvalue of type “pointer to _cv-qualifier-seq_ > `X`” wherever `X` is the current class [...] And [[over.match.oper] p1](http://eel.is/c++draft/over.match.oper#1) st

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
@@ -723,6 +723,7 @@ Bug Fixes to C++ Support - Clang now ignores template parameters only used within the exception specification of candidate function templates during partial ordering when deducing template arguments from a function declaration or when taking the addres

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92425 >From c26365ef78366b5c200d085ddc4211db1b2054e0 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 10:59:03 -0400 Subject: [PATCH 1/2] [Clang][Sema] ASTContext::getUnconstrainedType propa

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92425 >From c26365ef78366b5c200d085ddc4211db1b2054e0 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 10:59:03 -0400 Subject: [PATCH 1/3] [Clang][Sema] ASTContext::getUnconstrainedType propa

[clang] [Clang][Sema] ASTContext::getUnconstrainedType propagates dependence (PR #92425)

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

[clang] [Clang][Sema] Do not add implicit 'const' when matching constexpr function template explicit specializations after C++14 (PR #92449)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/92449 Clang incorrectly accepts the following when using C++14 or later: ```cpp struct A { template void f() const; template<> constexpr void f(); }; ``` Non-static member functions declared `constexpr` are

[clang] [Clang][Sema] Do not add implicit 'const' when matching constexpr function template explicit specializations after C++14 (PR #92449)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92449 >From b56eeb2ef435f06764bac0b062a8a0e747f697d4 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 15:47:04 -0400 Subject: [PATCH 1/2] [Clang][Sema] Do not add implicit 'const' when match

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/92452 Clang crashes when diagnosing the following invalid redeclaration in C++11: ```cpp struct A { void f(); }; constexpr void A::f() { } // crash here ``` This happens because `DiagnoseInvalidRedeclaration` trie

[clang] [Clang][Sema] Do not add implicit 'const' when matching constexpr function template explicit specializations after C++14 (PR #92449)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92449 >From b56eeb2ef435f06764bac0b062a8a0e747f697d4 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 15:47:04 -0400 Subject: [PATCH 1/2] [Clang][Sema] Do not add implicit 'const' when match

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
@@ -724,6 +724,8 @@ Bug Fixes to C++ Support templates during partial ordering when deducing template arguments from a function declaration or when taking the address of a function template. - Fix a bug with checking constrained non-type template parameters for equivalenc

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(), diag::note_member_def_close_const_

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(), diag::note_member_def_close_const_

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92318 >From 4ae259b21661caae2a9cd89437c56f3915195682 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 15 May 2024 16:13:03 -0400 Subject: [PATCH 1/4] [Clang][Sema] Don't build CXXDependentScopeMemberExp

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92452 >From 27fab1ec54259941e3ded174de18cd99aa89bf7e Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 16:42:27 -0400 Subject: [PATCH 1/2] [Clang][Sema] Fix crash when diagnosing near-match f

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
@@ -1527,20 +1527,20 @@ struct DeclaratorChunk { /// Retrieve the location of the 'const' qualifier. SourceLocation getConstQualifierLoc() const { - assert(MethodQualifiers); - return MethodQualifiers->getConstSpecLoc(); + return MethodQualifiers ? Metho

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(), diag::note_member_def_close_const_

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
@@ -724,6 +724,8 @@ Bug Fixes to C++ Support templates during partial ordering when deducing template arguments from a function declaration or when taking the address of a function template. - Fix a bug with checking constrained non-type template parameters for equivalenc

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92452 >From 27fab1ec54259941e3ded174de18cd99aa89bf7e Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 16:42:27 -0400 Subject: [PATCH 1/2] [Clang][Sema] Fix crash when diagnosing near-match f

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
@@ -724,6 +724,8 @@ Bug Fixes to C++ Support templates during partial ordering when deducing template arguments from a function declaration or when taking the address of a function template. - Fix a bug with checking constrained non-type template parameters for equivalenc

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92452 >From 27fab1ec54259941e3ded174de18cd99aa89bf7e Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 16:42:27 -0400 Subject: [PATCH 1/3] [Clang][Sema] Fix crash when diagnosing near-match f

[clang] [Clang][Sema] Diagnose current instantiation used as an incomplete base class (PR #92597)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/92597 Consider the following: ```cpp template struct A { struct B : A { }; }; ``` According to [[class.derived.general] p2](http://eel.is/c++draft/class.derived.general#2): > [...] A _class-or-decltype_ shall de

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration( << Idx << FDParam->getType() << NewFD->getParamDecl(Idx - 1)->getType(); } else if (FDisConst != NewFDisConst) { - SemaRef.Diag(FD->getLocation(), diag::note_member_def_close_const_

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92452 >From 187eb245484e21970ac55f05a78d3221f2f07f9a Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 16:42:27 -0400 Subject: [PATCH 1/3] [Clang][Sema] Fix crash when diagnosing near-match f

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

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/91503 ___ 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-17 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Closing this for now; I'll return to this once we correctly handle dependent `operator=`. https://github.com/llvm/llvm-project/pull/91503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92318 >From db264c719dfae25a536fb2452328d9aaeeea7b6f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 15 May 2024 16:13:03 -0400 Subject: [PATCH 1/4] [Clang][Sema] Don't build CXXDependentScopeMemberExp

[clang] [clang-tools-extra] [Clang][Sema] Diagnose current instantiation used as an incomplete base class (PR #92597)

2024-05-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92597 >From 9d95d211797843f3dc612fe4340354b5fbf6a2fe Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 17 May 2024 13:30:04 -0400 Subject: [PATCH 1/5] [Clang][Sema] Diagnose current instantiation used a

[clang] [clang-tools-extra] [Clang][Sema] Diagnose current instantiation used as an incomplete base class (PR #92597)

2024-05-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92597 >From 4a535c2f2660583487018f421788cd2b88d8428d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 17 May 2024 13:30:04 -0400 Subject: [PATCH 1/5] [Clang][Sema] Diagnose current instantiation used a

[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

2024-05-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92452 >From 613560033f7bf9acb9315766291bff07ee9e9b5f Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Thu, 16 May 2024 16:42:27 -0400 Subject: [PATCH 1/3] [Clang][Sema] Fix crash when diagnosing near-match f

[clang] [clang-tools-extra] [Clang][Sema] Diagnose current instantiation used as an incomplete base class (PR #92597)

2024-05-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92597 >From 4a535c2f2660583487018f421788cd2b88d8428d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 17 May 2024 13:30:04 -0400 Subject: [PATCH 1/7] [Clang][Sema] Diagnose current instantiation used a

<    3   4   5   6   7   8   9   10   >