[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-24 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s a-tarasyuk wrote: @shafik Thanks for the feedback. I've moved the test to the appropriate existing test. From my understanding, the crash is related to this https://github.com/llvm/llvm-pr

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/96228 >From 9e2730da07df0ee5102912490a687ba40bf06def Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 24 Jun 2024 18:55:51 +0300 Subject: [PATCH] [Clang] fix cast failures by adjusting the resolution of record

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
shafik wrote: There are several test failures that look related to this change, please check them out. https://github.com/llvm/llvm-project/pull/96228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s shafik wrote: I think this is a better location for the test: https://github.com/llvm/llvm-project/blob/main/clang/test/CXX/class/class.compare/class.compare.default/p1.cpp We normally wra

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix. I am curious what specifically about this code triggers the crash. We do have a test w/ a defaulted outside the class. So there is another condition needed to trigger this. It looks like removing `constexpr` from `operator==(d h, g i)

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/96228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] use parent declaration context to avoid asserting cast failure in defaulted comparison method (PR #96228)

2024-06-21 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/96228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits