[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-13 Thread André Brand via cfe-commits
thebrandre wrote: @Sirraide I just rebased the branch on main and ran the unit tests locally in case you'd like to merge it now. https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-13 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124409 From be69a60b46838afdf44855477cfc85b5b268a624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Wed, 22 Jan 2025 19:23:06 +0100 Subject: [PATCH 1/5] [clang] Add 'instantiated_from' for enums

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-06 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124409 From 1c829c6abcf6d2152088dce7799253bf94b77d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Wed, 22 Jan 2025 19:23:06 +0100 Subject: [PATCH 1/5] [clang] Add 'instantiated_from' for enums

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-06 Thread André Brand via cfe-commits
thebrandre wrote: @shafik @Sirraide I rechecked everything and I fixed some non-relative line numbers. I only just noticed now that I probably should have checked that by inserting some line numbers just before my test code to see if this doesn't break the test. 🙈 If there is still something

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-06 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124409 From 1c829c6abcf6d2152088dce7799253bf94b77d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Wed, 22 Jan 2025 19:23:06 +0100 Subject: [PATCH 1/5] [clang] Add 'instantiated_from' for enums

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-30 Thread André Brand via cfe-commits
thebrandre wrote: @shafik @Sirraide I don't have any experience writing (robust) tests for AST dumps. I hope it makes sense. 🙈 https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-30 Thread André Brand via cfe-commits
https://github.com/thebrandre edited https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-30 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124409 From bc59af3d2f6cd8c4e27628f662e39fdc28e88679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Wed, 22 Jan 2025 19:23:06 +0100 Subject: [PATCH 1/4] [clang] Add 'instantiated_from' for enums

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-29 Thread André Brand via cfe-commits
thebrandre wrote: @shafik @Sirraide Thanks for the feedback! I'll get to it as soon as I can. It's been a busy week at work. https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-27 Thread André Brand via cfe-commits
thebrandre wrote: @cor3ntin Thanks! I just added some details to the GitHub description. I hope it's not too verbose. And I rebased the branch to resolve the conflict in the release notes. https://github.com/llvm/llvm-project/pull/124407 ___ cfe-commi

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-27 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124407 From e535adb5e94f89350d2e64344857e001cc1e1ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Sat, 25 Jan 2025 14:25:32 +0100 Subject: [PATCH 1/3] [clang] Fix issues on template class enum

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-27 Thread André Brand via cfe-commits
https://github.com/thebrandre edited https://github.com/llvm/llvm-project/pull/124407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-26 Thread André Brand via cfe-commits
thebrandre wrote: I almost forgot to mention that this is actually valid code. [C++23 [class.mem] p6](https://wg21.link/class.mem#general-6) > A member shall not be declared twice in the *member-specification* except that > * a nested class or member class template can be declared and then later

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-25 Thread André Brand via cfe-commits
thebrandre wrote: ... and the information was very helpful when tracking down enum related issues like #124405. https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-01-25 Thread André Brand via cfe-commits
https://github.com/thebrandre created https://github.com/llvm/llvm-project/pull/124409 This enhances consistency with CXXRecordDecl and FunctionDecl, which also provide this information in the AST dump. From cf9c5e1593b1a46a4a29925ff4543e7565dcab7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-25 Thread André Brand via cfe-commits
https://github.com/thebrandre updated https://github.com/llvm/llvm-project/pull/124407 From b7f41ebfb51066c48231e44f7e2b681f0c4aba08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Sat, 25 Jan 2025 14:25:32 +0100 Subject: [PATCH 1/3] [clang] Fix issues on template class enum

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-25 Thread André Brand via cfe-commits
thebrandre wrote: @cor3ntin I came across this while refactoring, which is still in progress because I'm coming across odd things like this that make me a bit uncertain. Sometimes it's hard to tell if its a bug or a feature. https://github.com/llvm/llvm-project/pull/124407

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-25 Thread André Brand via cfe-commits
thebrandre wrote: Here are some details why I think this is a valid fix: If you take a look at the generated AST you can see that the EnumConstantDecl for `X 'S::E'` appears twice in the instantiation in the AST for the following example. ```cpp template struct S { enum E : T; enum E

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-25 Thread André Brand via cfe-commits
https://github.com/thebrandre created https://github.com/llvm/llvm-project/pull/124407 Fixes issue #124405. From b7f41ebfb51066c48231e44f7e2b681f0c4aba08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Brand?= Date: Sat, 25 Jan 2025 14:25:32 +0100 Subject: [PATCH 1/2] [clang] Fix issues