[clang] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

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

[clang] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

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

[clang] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

2025-01-17 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122928 >From 88125a0f3a28d49877cedfd4350ab6e0f37185ed Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 14 Jan 2025 11:33:33 + Subject: [PATCH] [clang][DebugInfo] Emit DW_AT_object_pointer on function defi

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-01-17 Thread Michael Buch via cfe-commits
Michael137 wrote: Hmm there's a clang-tidy test failing because this codepath gets hit for `UserDefinedLiteral`, which is a `CallExpr` with a single argument: ``` (lldb) p E->dump() UserDefinedLiteral 0x15402b738 'unsigned long long' |-ImplicitCastExpr 0x15402b720 'unsigned long long (*)(unsigne

[clang] [clang][PCH] Don't try to create standalone debug-info for types marked nodebug (PR #123253)

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

[clang] [clang][PCH] Don't try to create standalone debug-info for types marked nodebug (PR #123253)

2025-01-16 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/123253 >From 33b128cc2fd83894506f27ad730c3ac145c49f6f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 16 Jan 2025 23:02:10 + Subject: [PATCH 1/2] [clang][PCH] Don't try to create standalone debug-info fo

[clang] [clang][PCH] Don't try to create standalone debug-info for types marked nodebug (PR #123253)

2025-01-16 Thread Michael Buch via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++23 -x c++-header -emit-pch -fmodule-format=obj \ +// RUN: -o %t.pch %s \ +// RUN: -mllvm -debug-only=pchcontainer &>%t-pch.ll +// RUN: cat %t-pch.ll | FileCheck %s + +template Michael137 wrote:

[clang] [clang][PCH] Don't try to create standalone debug-info for types marked nodebug (PR #123253)

2025-01-16 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/123253 Fixes one of the crashes uncovered by https://github.com/llvm/llvm-project/pull/118710 `getOrCreateStandaloneType` asserts that a `DIType` was created for the requested type. If the `Decl` was marked `nodebu

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-01-16 Thread Michael Buch via cfe-commits
@@ -3183,10 +3183,24 @@ Expr *Expr::IgnoreUnlessSpelledInSource() { } return E; }; + + auto IgnoreImplicitCallSingleStep = [](Expr *E) { +if (auto *C = dyn_cast(E)) { + auto NumArgs = C->getNumArgs(); + if (NumArgs == 1 || + (NumArgs > 1 && isa

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-01-16 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From b43ffd0c1bb6e4f1ca5b8458848f574480021b08 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 1/8] [clang][DebugInfo] Expand detection of structured bindings

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-01-16 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From b43ffd0c1bb6e4f1ca5b8458848f574480021b08 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 1/8] [clang][DebugInfo] Expand detection of structured bindings

[clang] [clang][DebugInfo] Emit DW_AT_object_pointer on function definitions with explicit `this` (PR #122897)

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

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Michael Buch via cfe-commits
@@ -145,12 +146,18 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. - /// \return \

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Michael Buch via cfe-commits
@@ -145,12 +146,18 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. - /// \return \

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Michael Buch via cfe-commits
@@ -145,12 +146,17 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. + /// \param Na

[clang] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

2025-01-14 Thread Michael Buch via cfe-commits
Michael137 wrote: Will be rebased on top of https://github.com/llvm/llvm-project/pull/122897 https://github.com/llvm/llvm-project/pull/122928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [clang][DebugInfo] Emit DW_AT_object_pointer on function declarations with explicit `this` (PR #122928)

2025-01-14 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/122928 In https://github.com/llvm/llvm-project/pull/122897 we started attaching `DW_AT_object_pointer` to function definitions. This patch does the same but for function declarations (which we do for implicit objec

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Michael Buch via cfe-commits
@@ -145,12 +146,17 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. + /// \param Na

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: LLDB API adjustments look fine. Just left some minor comments re. documentation https://github.com/llvm/llvm-project/pull/122887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Michael Buch via cfe-commits
@@ -2711,6 +2715,12 @@ class DeclContext { bool Deserialize = false) const; private: + /// Lookup all external visible declarations and the external declarations + /// within the same module specified by \param NamedModule. We can't Michae

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

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

[clang] [clang][DebugInfo] Emit DW_AT_object_pointer on function definitions with explicit `this` (PR #122897)

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

[clang] [clang][DebugInfo] Emit DW_AT_object_pointer on function definitions with explicit `this` (PR #122897)

2025-01-14 Thread Michael Buch via cfe-commits
Michael137 wrote: @dwblaikie @adrian-prantl any thoughts on adjusting the DWARF spec to allow explicit `this` parameters to be non-artificial but still be valid `DW_AT_object_pointer`s? https://github.com/llvm/llvm-project/pull/122897 ___ cfe-commits

[clang] [clang][DebugInfo] Emit DW_AT_object_pointer on function definitions with explicit `this` (PR #122897)

2025-01-14 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/122897 We currently don't emit `DW_AT_object_pointer` on function declarations or definitions. GCC suffers from the same issue: https://godbolt.org/z/h4jeT54G5 If I interpreted the DWARFv5 spec correctly, it doesn'

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-01-13 Thread Michael Buch via cfe-commits
Michael137 wrote: Added tests and updated PR description. https://github.com/llvm/llvm-project/pull/122265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-01-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From b43ffd0c1bb6e4f1ca5b8458848f574480021b08 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 1/7] [clang][DebugInfo] Expand detection of structured bindings

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

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

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

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

[clang] [lldb] [clang][DebugInfo] Expand detection of structured bindings to account for std::get free function (PR #122265)

2025-01-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From b43ffd0c1bb6e4f1ca5b8458848f574480021b08 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 1/6] [clang][DebugInfo] Expand detection of structured bindings

[clang] [lldb] [clang][DebugInfo] Expand detection of structured bindings to account for std::get free function (PR #122265)

2025-01-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From b43ffd0c1bb6e4f1ca5b8458848f574480021b08 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 1/5] [clang][DebugInfo] Expand detection of structured bindings

[clang] [lldb] [clang][DebugInfo] Expand detection of structured bindings to account for std::get free function (PR #122265)

2025-01-13 Thread Michael Buch via cfe-commits
Michael137 wrote: > Did you try to modify `IgnoreUnlessSpelledInSource` to support CallExpr? Updated to use this approach in latest commit. Seems to work well (including the explicit object parameter case). Didn't find a great way to test this in the clang AST unit-tests yet. Trying to underst

[clang] [lldb] [clang][DebugInfo] Expand detection of structured bindings to account for std::get free function (PR #122265)

2025-01-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From b43ffd0c1bb6e4f1ca5b8458848f574480021b08 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 1/4] [clang][DebugInfo] Expand detection of structured bindings

[clang] [lldb] [clang][DebugInfo] Expand detection of structured bindings to account for std::get free function (PR #122265)

2025-01-13 Thread Michael Buch via cfe-commits
Michael137 wrote: > > > Did you try to modify `IgnoreUnlessSpelledInSource` to support CallExpr? > > > > > > Yea I was thinking about it initially. But I wasn't sure what that would > > look like tbh. IIUC `IgnoreImplicitMemberCallSingleStep` will unwrap > > `CXXMemberCallExpr` into the under

[clang] [clang-tools-extra] [lldb] Reapply "[clang] Avoid re-evaluating field bitwidth" (PR #122289)

2025-01-10 Thread Michael Buch via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/Michael137 commented: LLDB changes LGTM https://github.com/llvm/llvm-project/pull/122289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2025-01-10 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/118466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [lldb] [clang][DebugInfo] Expand detection of structured bindings to account for std::get free function (PR #122265)

2025-01-09 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/122265 >From f56f9469e5465f38f6252b2c8c2136473187969b Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Jan 2025 10:01:31 + Subject: [PATCH 1/3] [clang][DebugInfo] Expand detection of structured bindings

[clang] [lldb] [clang][DebugInfo] Expand detection of structured bindings to account for std::get free function (PR #122265)

2025-01-09 Thread Michael Buch via cfe-commits
Michael137 wrote: > Did you try to modify `IgnoreUnlessSpelledInSource` to support CallExpr? Yea I was thinking about it initially. But I wasn't sure what that would look like tbh. IIUC `IgnoreImplicitMemberCallSingleStep` will unwrap `CXXMemberCallExpr` into the underlying `MemberExpr`. And t

[clang] [clang][Sema] Move computing enum width and type to a separate function (PR #120965)

2025-01-02 Thread Michael Buch via cfe-commits
@@ -20099,73 +20179,13 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange, BestPromotionType = BestType; BestWidth = Context.getIntWidth(BestType); - } - else if (NumNegativeBits) { -// If there is a negative value, figure out the small

[clang] [clang][Sema] Move computing enum width and type to a separate function (PR #120965)

2025-01-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: Looks fine to me, thanks! I'll defer approval to one of the maintainers (lets mark the commit as `[NFC]` so it's clear that this doesn't change behaviour) https://github.com/llvm/llvm-project/pull/120965 ___ c

[clang] [clang][Sema] Move computing enum width and type to a separate function (PR #120965)

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

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-12-23 Thread Michael Buch via cfe-commits
Michael137 wrote: > > FWIW, I came across another no_unique_address-related crash today: > > ``` > > $ cat a.cc > > struct S { > > private: > > int i; > > short s; > > }; > > static_assert(sizeof(S) == 8); > > > > struct T { > > [[no_unique_address]] S s; > > char c; > > }; > > static_as

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-12-23 Thread Michael Buch via cfe-commits
Michael137 wrote: > FWIW, I came across another no_unique_address-related crash today: > > ``` > $ cat a.cc > struct S { > private: > int i; > short s; > }; > static_assert(sizeof(S) == 8); > > struct T { > [[no_unique_address]] S s; > char c; > }; > static_assert(sizeof(T) == 8); > >

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

2024-12-23 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)

2024-12-23 Thread Michael Buch via cfe-commits
@@ -2299,11 +2301,103 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_va

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Michael Buch via cfe-commits
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue, FromD, FromDInherited); } +TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1) { + const char *ToCode = + R"( + namespace a { + } + namespace a { +

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Michael Buch via cfe-commits
@@ -6082,6 +6084,7 @@ TEST_P(ASTImporterLookupTableTest, LookupSearchesInTheWholeRedeclChain) { auto Res = LT.lookup(N1, Name); ASSERT_EQ(Res.size(), 1u); EXPECT_EQ(*Res.begin(), A); + EXPECT_TRUE(LT.lookup(N2, Name).empty()); Michael137 wrote: So prio

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Michael Buch via cfe-commits
@@ -10181,6 +10184,151 @@ TEST_P(ImportTemplateParmDeclDefaultValue, FromD, FromDInherited); } +TEST_P(ASTImporterOptionSpecificTestBase, ImportIntoReopenedNamespaceNoMatch1) { + const char *ToCode = + R"( + namespace a { + } + namespace a { +

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: LLDB doesn't use the `LookupTable` infrastructure here so my understanding of this is limited. Generally the idea makes sense to me. Just left some clarification questions for my own understanding. Does this have any affect on other redeclarable `DeclCo

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

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

[clang] [clang][ASTImporter] Not using primary context in lookup table (PR #118466)

2024-12-18 Thread Michael Buch via cfe-commits
@@ -3165,6 +3165,7 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { if (Error Err = ImportImplicitMethods(DCXX, FoundCXX)) return std::move(Err); } +return FoundDef; Michael137 wrote:

[clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

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

[clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-17 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/120154 >From b4c56cb11feb10a153edfd1aff8d53e43f7bb7db Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 16 Dec 2024 22:27:08 + Subject: [PATCH 1/2] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forw

[clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-16 Thread Michael Buch via cfe-commits
@@ -2995,20 +2995,21 @@ llvm::DIType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, if (!ID) return nullptr; + auto RuntimeLang = + static_cast(TheCU->getSourceLanguage()); + // Return a forward declaration if this type was imported from a clang module,

[clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-16 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/120154 In Objective-C, forward declarations are currently represented as: ``` DW_TAG_structure_type DW_AT_name("Foo") DW_AT_declaration (true) DW_AT_APPLE_runtime_class (DW_LANG_ObjC) ``

[clang] [NFC] Updating Debug Info generation for 'this' (PR #119445)

2024-12-12 Thread Michael Buch via cfe-commits
Michael137 wrote: Don't see a problem with this but could we elaborate on the motivation for this? Looks like this is required for https://github.com/llvm/llvm-project/pull/119041? Why is that? The original change this is based on is: https://github.com/microsoft/DirectXShaderCompiler/pull/62

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

2024-12-12 Thread Michael Buch via cfe-commits
@@ -8544,7 +8524,8 @@ clang::EnumConstantDecl *TypeSystemClang::AddEnumerationValueToEnumerationType( bool is_signed = false; underlying_type.IsIntegerType(is_signed); - llvm::APSInt value(enum_value_bit_size, is_signed); + // APSInt constructor's sign argument is isUns

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

2024-12-12 Thread Michael Buch via cfe-commits
@@ -2299,11 +2301,103 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_va

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

2024-12-12 Thread Michael Buch via cfe-commits
@@ -8544,7 +8524,8 @@ clang::EnumConstantDecl *TypeSystemClang::AddEnumerationValueToEnumerationType( bool is_signed = false; underlying_type.IsIntegerType(is_signed); - llvm::APSInt value(enum_value_bit_size, is_signed); + // APSInt constructor's sign argument is isUns

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

2024-12-06 Thread Michael Buch via cfe-commits
Michael137 wrote: > So, is this patch worth pursuing or is it too much code for a too specific > use case? Sorry I was out for a few weeks when you pinged. I'll have another pass/think about it early next week (if nobody else gets to it before me). https://github.com/llvm/llvm-project/pull/11

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

2024-12-04 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. Not sure how well maintained these are either, but since they still exist, LGTM https://github.com/llvm/llvm-project/pull/117943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][www] Remove ClangDataFormat.py from docs (PR #117943)

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

[clang] [llvm] Introduce symbol versioning for clang-cpp (PR #116556)

2024-11-19 Thread Michael Buch via cfe-commits
Michael137 wrote: Looks like this broke macOS CI: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/7705/execution/node/45/log/ ``` ld: unknown options: --version-script clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` Could you take a look/rev

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread Michael Buch via cfe-commits
Michael137 wrote: Hmm this one's a bit strange. Looks like the issue is in: ``` // Clang-diagnostics pragmas always take precedence over suppression mapping. if (!Mapping.isPragma()) { // We also use presumed locations here to improve reproduci

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread Michael Buch via cfe-commits
Michael137 wrote: > > FYI, looks like this is causing following LLDB tests to fail: > > https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/15106/execution/node/97/log/ > > ``` > > Unresolved Tests (17): > > lldb-api :: > > commands/expression/import-std-module/array/TestArray

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-12 Thread Michael Buch via cfe-commits
Michael137 wrote: FYI, looks like this is causing following LLDB builds to fail: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/15106/execution/node/97/log/ ``` Unresolved Tests (17): lldb-api :: commands/expression/import-std-module/array/TestArrayFromStdModule.py lldb

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-12 Thread Michael Buch via cfe-commits
Michael137 wrote: > It is a realistic requirement that new similar parameters are added, I had > already an (experimental) fix where this is needed. Still I like better the > solution with separate caches because efficiency reasons > (`IgnoreTemplateParmDepth = true` is rarely used, not at all

[clang] [clang][ASTImporter] Allow import of similar friend template with different depth (PR #115734)

2024-11-11 Thread Michael Buch via cfe-commits
@@ -6120,6 +6119,19 @@ ExpectedDecl ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) { // see ASTTests test ImportExistingFriendClassTemplateDef. continue; } +// When importing a friend, it is possible that multiple declarations

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Michael Buch via cfe-commits
Michael137 wrote: > > Another possible solution: Use two `NonEquivalentDecls` sets, one for > > `IgnoreTemplateParmDepth = true` and one for `false`. This may use less > > memory (no rarely used third value in the key) but requires more code > > changes. > > I like this idea, and I think it c

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Michael Buch via cfe-commits
Michael137 wrote: > Another possible solution: Use two `NonEquivalentDecls` sets, one for > `IgnoreTemplateParmDepth` = true and one for false. This may use less memory > (no rarely used third value in the key) but requires more code changes. > Probably use these two caches only in `ASTImporte

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-11 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/115518 ___ 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)

2024-11-06 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)

2024-11-06 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 (PR #115245)

2024-11-06 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/115245 None >From f8087e96f8d8d242a4da2e74a3259161a3bfc179 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

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

2024-11-05 Thread Michael Buch via cfe-commits
Michael137 wrote: I haven't done an in-depth review of the patch yet but my first instinct here is that this looks like a lot of work for LLDB which the compiler has already done, so we ideally don't want to repeat. Where is this actually an issue from a user perspective? In the example you ga

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

2024-11-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/114529 >From 9337e170d920eaabe2b59a25622f0c554ca5afcf Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sun, 20 Oct 2024 11:35:15 +0100 Subject: [PATCH 1/2] [WIP][lldb][Expression] More reliable function call resol

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

2024-11-05 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/114529 >From 9337e170d920eaabe2b59a25622f0c554ca5afcf Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sun, 20 Oct 2024 11:35:15 +0100 Subject: [PATCH 1/2] [WIP][lldb][Expression] More reliable function call resol

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

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

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

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

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

2024-11-01 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/114529 >From 7f18d96b7117e83c4ed246ac498ee4c9a72064ff Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sun, 20 Oct 2024 11:35:15 +0100 Subject: [PATCH] [WIP][lldb][Expression] More reliable function call resolutio

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

2024-11-01 Thread Michael Buch via cfe-commits
Michael137 wrote: Example constructor decl would look like the following: ``` | `-CXXConstructorDecl 0x246e6f8 <> Bar 'void ()' | `-StructorMangledNamesAttr 0x246e7c0 <> Implicit 2:$__lldb_func_0x014B6560:257 1:$__lldb_func_0x014B6560:294 ``` https://github.com/llvm/llvm-proj

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

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

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

2024-11-01 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/114529 >From 9337e170d920eaabe2b59a25622f0c554ca5afcf Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Sun, 20 Oct 2024 11:35:15 +0100 Subject: [PATCH] [WIP][lldb][Expression] More reliable function call resolutio

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

2024-11-01 Thread Michael Buch via cfe-commits
@@ -140,6 +141,64 @@ void MangleContext::mangleName(GlobalDecl GD, raw_ostream &Out) { const ASTContext &ASTContext = getASTContext(); const NamedDecl *D = cast(GD.getDecl()); + if (const StructorMangledNamesAttr *SMA = + D->getAttr()) { +CXXConstructorDecl

[clang] [lldb] [llvm] [WIP][lldb][Expression] More reliable function call resolution (PR #114529)

2024-11-01 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/114529 Naive implementation of all the parts of following RFC: https://discourse.llvm.org/t/rfc-lldb-handling-abi-tagged-constructors-destructors-in-expression-evaluator/82816 Main changes: 1. Instead of relying on

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-21 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/97443 >From 38b7837bcc5da9e89778191654f9552ebccacbd5 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 2 Jul 2024 18:43:34 +0200 Subject: [PATCH 1/3] [clang][RecordLayoutBuilder] Be stricter about inferring pa

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-21 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: gentle ping @efriedma-quic mind taking another look? Latest iteration skips over empty fields that overlap. https://github.com/llvm/llvm-project/pull/97443 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-11 Thread Michael Buch via cfe-commits
Michael137 wrote: ping (btw, @labath is the alignment miscalculation still causing issues for you internally? or did you find a workaround?) https://github.com/llvm/llvm-project/pull/97443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-10-10 Thread Michael Buch via cfe-commits
Michael137 wrote: Just to circle back on this. Managed to reduce the crash I was seeing to something pretty simple. The gist of the issue is that we silently create ODR violations in LLDB's scratch context (and LLDB uses `ODRHandlingType::Liberal`, so we try to continue `ASTImport`ing despite

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

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

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

2024-10-02 Thread Michael Buch via cfe-commits
Michael137 wrote: Test failure unrelated. Will merge to unblock libc++ and investigate a path forward as a follow-up https://github.com/llvm/llvm-project/pull/110767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

2024-10-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/110767 >From 53bfa785514f9811952aa5122f60d16129136285 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Oct 2024 00:42:35 +0100 Subject: [PATCH 1/3] [clang][DebugInfo] Revert to printing canonical typenames

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

2024-10-02 Thread Michael Buch via cfe-commits
Michael137 wrote: > If we're still producing the typedef-style DWARF for these alias template > specializations - perhaps lldb could not cache pretty printers for typedefs? > (I guess the pretty printers shouldn't be typedef-specific, right, since > typedefs are transparent anyway - but I gues

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

2024-10-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/110767 >From 53bfa785514f9811952aa5122f60d16129136285 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Oct 2024 00:42:35 +0100 Subject: [PATCH 1/2] [clang][DebugInfo] Revert to printing canonical typenames

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/97443 >From 3a718c75d0458b7aece72f2ba8e5aa5a68815237 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 2 Jul 2024 18:43:34 +0200 Subject: [PATCH 1/3] [clang][RecordLayoutBuilder] Be stricter about inferring pa

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-02 Thread Michael Buch via cfe-commits
Michael137 wrote: > If I'm understanding correctly, the way this currently works is that you do > normal field layout, then if you discover that the actual offset of a field > is less than the offset normal field layout would produce, you assume the > struct is packed. This misses cases where

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/97443 >From 3a718c75d0458b7aece72f2ba8e5aa5a68815237 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 2 Jul 2024 18:43:34 +0200 Subject: [PATCH 1/2] [clang][RecordLayoutBuilder] Be stricter about inferring pa

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-02 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/97443 >From 3a718c75d0458b7aece72f2ba8e5aa5a68815237 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Tue, 2 Jul 2024 18:43:34 +0200 Subject: [PATCH 1/6] [clang][RecordLayoutBuilder] Be stricter about inferring pa

[clang] [lldb] [clang][RecordLayoutBuilder] Be stricter about inferring packed-ness in ExternalLayouts (PR #97443)

2024-10-02 Thread Michael Buch via cfe-commits
Michael137 wrote: > > Skipping empty fields does seem like a better heuristic here > > FWIW, I (independently) came to the same conclusion when investigating the > fallout of #76756, though it's not fully clear to me whether the PR has been > updated to do that. Not yet, but will have a look

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

2024-10-02 Thread Michael Buch via cfe-commits
Michael137 wrote: Test failures in `Sema/aarch64-sve-vector-trig-ops.c` unrelated https://github.com/llvm/llvm-project/pull/110767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

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

  1   2   3   4   5   >