[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-27 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,57 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-27 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-05-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

2025-04-16 Thread Michael Buch via cfe-commits
Michael137 wrote: Reverted in https://github.com/llvm/llvm-project/pull/135974 since it's breaking the LLDB build. Let me know if you need help reproducing https://github.com/llvm/llvm-project/pull/135808 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang-tools-extra] Revert "[clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc`" (PR #135974)

2025-04-16 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/135974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-04-04 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/133448 >From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 28 Mar 2025 13:29:27 + Subject: [PATCH 1/4] [clang][Sema] Fix typo in 'offsetof' diagnostics Before:

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-04-04 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/133448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxxabi] [lldb] [llvm] [WIP][lldb] Alternative implementation of more reliable function call infrastructure (PR #115245)

2025-04-04 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxxabi] [lldb] [llvm] [WIP][lldb] Alternative implementation of more reliable function call infrastructure (PR #115245)

2025-04-04 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/115245 >From 63ca211312cd9dcbf28d30866a429262b504bdb3 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 5 Nov 2024 00:22:07 + Subject: [PATCH] Init --- clang/include/clang/Basic/Attr.td | 7

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-03-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/133448 >From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 28 Mar 2025 13:29:27 + Subject: [PATCH 1/2] [clang][Sema] Fix typo in 'offsetof' diagnostics Before:

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-03-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/133448 >From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 28 Mar 2025 13:29:27 + Subject: [PATCH 1/3] [clang][Sema] Fix typo in 'offsetof' diagnostics Before:

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-03-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/133448 Before: ``` offset of on non-POD type ``` After: ``` offsetof on non-POD type ``` >From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 28 Mar 2025 13:29:27 +0

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-21 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: LLDB changes LGTM https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix immediate escalation of template function specializations. (PR #124404)

2025-03-15 Thread Michael Buch via cfe-commits
Michael137 wrote: FYI, this is causing the LLDB `image dump ast` command to infinitely recurse when we have template functions in the AST. Not really super urgent because it's not a command most people use, and the root cause is probably due to the way LLDB constructs its AST. But thought I'd

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: Would be great to have a simpler of getting to the vtable info! I left some nits Don't see an issue with the the general approach, but i'll let others chime in https://github.com/llvm/llvm-project/pull/130255 _

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/130255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-07 Thread Michael Buch via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[clang] [clang][DebugInfo][test] Add tests for C++20 non-type template parameters (PR #127056)

2025-02-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/127056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
Michael137 wrote: Fixed in `0feb00f17cbaac7428dcb7aed13d903b65974978` https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
Michael137 wrote: FYI on macOS CI this is failing with: ``` FAIL: test_dsym (TestCPPEnumPromotion.TestCPPEnumPromotion) -- Traceback (most recent call last): File "/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
Michael137 wrote: let me know if you need me to merge this for you https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo][test] Add tests for C++20 non-type template parameters (PR #127056)

2025-02-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/127056 >From b84ebf9c696ffc3867a52ed1540d59d18d2e5ece Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 13 Feb 2025 13:00:28 + Subject: [PATCH 1/2] [clang][DebugInfo][test] Add tests for C++20 non-type tem

[clang] [clang][DebugInfo][test] Add tests for C++20 non-type template parameters (PR #127056)

2025-02-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/127056 This exercises the codepath where we create `DITemplateValueParameter`s whose `TemplateArgument::ArgKind` is `StructuralValue`, which was added in (https://github.com/llvm/llvm-project/pull/78041). Previousl

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
@@ -8476,27 +8476,20 @@ bool TypeSystemClang::CompleteTagDeclarationDefinition( clang::ASTContext &ast = lldb_ast->getASTContext(); - /// TODO This really needs to be fixed. + unsigned NumNegativeBits = 0; Michael137 wrote: Can we move this block back in

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. Looks great! Thank you for moving all this functionality into Clang LGTM (just one minor comment left) https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@

[clang] [clang][ASTDump] Dump value of structural TemplateArguments (PR #126937)

2025-02-12 Thread Michael Buch via cfe-commits
Michael137 wrote: ah fair enough lets get that one merged then https://github.com/llvm/llvm-project/pull/126937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTDump] Dump value of structural TemplateArguments (PR #126937)

2025-02-12 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/126937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Move computing enum bits into a separate function (PR #126096)

2025-02-10 Thread Michael Buch via cfe-commits
Michael137 wrote: > > > > This is just moving stuff around so that seems fine. Though, I wonder, > > > > could we just pass e.g. an `ArrayRef` to `computeEnumBits()`? > > > > The LLDB pr you linked seems to have an > > > > `SmallVector`, so that should be possible (I think > > > > it does req

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-10 Thread Michael Buch via cfe-commits
Michael137 wrote: > @Michael137 Changed the first argument of `computeEnumBits` to an `ArrayRef` > to avoid the template and so it can be still seamlessly used from Sema. On > LLDB side, I had to create a `SmallVector` and put enum constants there at > the point of their creation (`AddEnumerat

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-10 Thread Michael Buch via cfe-commits
@@ -2367,11 +2370,27 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb][TypeSystemClang] Initialize ClassTemplateSpecializationDecl's StrictPackMatch field (PR #126215)

2025-02-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/126215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-07 Thread Michael Buch via cfe-commits
Michael137 wrote: Put up https://github.com/llvm/llvm-project/pull/126215 Should address the failure @hokein observed https://github.com/llvm/llvm-project/pull/125791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [lldb] [lldb][TypeSystemClang] Initialize ClassTemplateSpecializationDecl's StrictPackMatch field (PR #126215)

2025-02-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/126215 This addresses the MSAN failure reported in https://github.com/llvm/llvm-project/pull/125791#issuecomment-2639183154: ``` ==5633==WARNING: MemorySanitizer: use-of-uninitialized-value #0 in clang::ASTNodeI

[clang] [clang][DebugInfo] Set EnumKind based on enum_extensibility attribute (PR #126045)

2025-02-07 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/126045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Set EnumKind based on enum_extensibility attribute (PR #126045)

2025-02-07 Thread Michael Buch via cfe-commits
Michael137 wrote: The one test failure unrelated: ``` FAIL: Clang :: Tooling/clang-linker-wrapper-spirv-elf.cpp (20542 of 21851) TEST 'Clang :: Tooling/clang-linker-wrapper-spirv-elf.cpp' FAILED Exit Code: 1 Command Output (stderr): -- RUN: at line 4: mk

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > > > > Actually, @mizvekov, can we make the > > > > `ClassTemplateSpecializationDecl::ClassTemplateSpecializationDecl(ASTContext > > > > &C, Kind DK)` constructor default initialize the `StrictPackMatch` > > > > member to false? In that case users of `CreateDeserialized` wou

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > > Actually, @mizvekov, can we make the > > `ClassTemplateSpecializationDecl::ClassTemplateSpecializationDecl(ASTContext > > &C, Kind DK)` constructor default initialize the `StrictPackMatch` member > > to false? In that case users of `CreateDeserialized` wouldn't need to wo

[clang] [clang][DebugInfo] Set EnumKind based on enum_extensibility attribute (PR #126045)

2025-02-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/126045 >From 10d37ec7e406d3b6ff5034003087a4b6cbb76fe0 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 5 Feb 2025 12:02:50 + Subject: [PATCH] [clang][DebugInfo] Set EnumKind based on enum_extensibility at

[clang] [clang][Sema] Move computing enum bits into a separate function (PR #126096)

2025-02-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > This is just moving stuff around so that seems fine. Though, I wonder, could > we just pass e.g. an `ArrayRef` to `computeEnumBits()`? The LLDB pr > you linked seems to have an `SmallVector`, so that should > be possible (I think it does require a `reinterpret_cast` from a

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-06 Thread Michael Buch via cfe-commits
Michael137 wrote: Actually, @mizvekov, can we make `ClassTemplatePartialSpecializationDecl(ASTContext&)` default initialize the `StrictPackMatch` member to false? In that case users of `CreateDeserialized` wouldn't need to worry about it being potentially uninitialized? Otherwise we'll have t

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-05 Thread Michael Buch via cfe-commits
@@ -280,7 +280,8 @@ std::optional CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) { new_class_template->getDeclContext(), new_class_template->getTemplatedDecl()->getLocation(), new_class_template->getLocation(), new_class_template, imported_args, -

[clang] [llvm] [llvm][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-02-05 Thread Michael Buch via cfe-commits
Michael137 wrote: I've only included the LLVM changes here now (anything metadata and DWARF attribute related). Will do the plumbing from the frontend in a separate patch https://github.com/llvm/llvm-project/pull/124752 ___ cfe-commits mailing list cf

[clang] [llvm] [llvm][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-02-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/124752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP][clang][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-02-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > Is my thing about the ctor understanding correct, and it's that the ctor > exists theoretically/abstractly, but not in the AST or in the generated > IR/DWARF? Could it be added/would that be sufficient? > > But, yeah, probably fine to just add the attribute, since that's th

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > Might be as simple as a constant true or false, but I'm nearing the end of my > work day so I've reverted it for now. > > In the meantime, @Michael137 might know if this is something LLDB should > actually be tracking. Or in other words, is #125290 something that can happen

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Feel fr

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Ah true

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: That's

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Unless

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: Apologi

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: > Mostl

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -0,0 +1,37 @@ +""" +Test LLDB type promotion of unscoped enums. +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestCPPEnumPromotion(TestBase): +@skipIf(debug_info=no_match([

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -0,0 +1,37 @@ +""" +Test LLDB type promotion of unscoped enums. +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestCPPEnumPromotion(TestBase): +@skipIf(debug_info=no_match([

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( Michael137 wrote: I do th

[clang] [llvm] [WIP][clang][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-01-29 Thread Michael Buch via cfe-commits
Michael137 wrote: > (hmm, can't use the foundation library on godbolt/compiler explorer) Can you > show a small example of the code you're interested in and the DWARF it > produces? The documentation I can find seems to suggest that the extensible > enums have ctors that take the underlying in

[clang] [llvm] [WIP][clang][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-01-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/124752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP][clang][DebugInfo] Add new DW_AT_APPLE_ENUM_KIND to encode enum_extensibility (PR #124752)

2025-01-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/124752 When creating `EnumDecl`s from DWARF for Objective-C `NS_ENUM`s, the Swift compiler tries to figure out if it should perform "swiftification" of that enum (which involves renaming the enumerator cases, etc.)

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
@@ -0,0 +1,37 @@ +""" +Test LLDB type promotion of unscoped enums. +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestCPPEnumPromotion(TestBase): +@skipIf(debug_info=no_match([

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
@@ -3903,6 +3903,7 @@ class EnumDecl : public TagDecl { void setInstantiationOfMemberEnum(ASTContext &C, EnumDecl *ED, TemplateSpecializationKind TSK); +public: Michael137 wrote: I see why you moved it. It's because we're

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
@@ -3903,6 +3903,7 @@ class EnumDecl : public TagDecl { void setInstantiationOfMemberEnum(ASTContext &C, EnumDecl *ED, TemplateSpecializationKind TSK); +public: Michael137 wrote: Can we not just leave this whole block in

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 deleted https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-28 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: Looks much better Left some more clarification comments https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
@@ -3903,6 +3903,7 @@ class EnumDecl : public TagDecl { void setInstantiationOfMemberEnum(ASTContext &C, EnumDecl *ED, TemplateSpecializationKind TSK); +public: Michael137 wrote: Don't need this change anymore https://gi

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Michael Buch via cfe-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[clang] [clang][ASTImporter] Import source location of explicit object parameter instead of copying it (PR #124305)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/124305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix possible crash at import of function template (PR #124273)

2025-01-27 Thread Michael Buch via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: Michael137 wrote: > If this case is not handled, the following `setDescribedFunctionTemplate` > will run into an assertion. The case happens in the test code. What exactly > happens is that because of the `__get_first_arg` mismatch a field >

[clang] [clang][ASTImporter] Import source location of explicit object parameter instead of copying it (PR #124305)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124305 >From 2fbabc9802e09a175bd71624b2ff89a2d9b7f3a1 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 11:59:42 + Subject: [PATCH 1/4] [clang][ASTImporter][test] Add test for importing explici

[clang] [clang][ASTImporter] Import source location of explicit object parameter instead of copying it (PR #124305)

2025-01-27 Thread Michael Buch via cfe-commits
@@ -3441,13 +3441,33 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportParmVarDecl) { ASSERT_TRUE(FromVar); ASSERT_TRUE(FromVar->hasUninstantiatedDefaultArg()); ASSERT_TRUE(FromVar->getUninstantiatedDefaultArg()); + ASSERT_FALSE(FromVar->isExplicitObjectParameter());

[clang] [clang][ASTImporter] Import source location of explicit object parameter instead of copying it (PR #124305)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/124305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Import source location of explicit object parameter instead of copying it (PR #124305)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/124305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix possible crash at import of function template (PR #124273)

2025-01-27 Thread Michael Buch via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/Michael137 approved this pull request. https://github.com/llvm/llvm-project/pull/124273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124305 >From 2fbabc9802e09a175bd71624b2ff89a2d9b7f3a1 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 11:59:42 + Subject: [PATCH 1/3] [clang][ASTImporter][test] Add test for importing explici

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-27 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124305 >From 2fbabc9802e09a175bd71624b2ff89a2d9b7f3a1 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 11:59:42 + Subject: [PATCH 1/2] [clang][ASTImporter][test] Add test for importing explici

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread Michael Buch via cfe-commits
@@ -3441,13 +3441,33 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportParmVarDecl) { ASSERT_TRUE(FromVar); ASSERT_TRUE(FromVar->hasUninstantiatedDefaultArg()); ASSERT_TRUE(FromVar->getUninstantiatedDefaultArg()); + ASSERT_FALSE(FromVar->isExplicitObjectParameter());

[clang] [clang][ASTImporter] Fix possible crash at import of function template (PR #124273)

2025-01-24 Thread Michael Buch via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/Michael137 commented: So in spirit this is kind of like an ODR violation right? Which the ASTImporter does try to handle, so this seems reasonable to me. For my own understanding, where did the crash end up happening? Also,

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124305 >From 2fbabc9802e09a175bd71624b2ff89a2d9b7f3a1 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 11:59:42 + Subject: [PATCH] [clang][ASTImporter][test] Add test for importing explicit ob

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/124305 Adds test that confirms that we import the explicit object parameter location for `ParmVarDecl`s. This is how Clang determines whether a parameter `isExplicitObjectParamater`. The LLDB expression evaluator r

  1   2   3   4   5   6   >