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

2024-11-27 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/117943 The script was removed in https://github.com/llvm/llvm-project/pull/96385. Instead, mention the LLVM formatter as it's still very useful for Clang's code. >From 438047cf5d8eb582a9a2e989aa6137d8dbe57d9d Mon

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/118281 >From ffba96ae0b32a25b810c46c46e9c360c3eef400d Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 2 Dec 2024 10:03:25 + Subject: [PATCH 1/3] [clang] Warn [[clang::lifetimebound]] misusages on types

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -8612,7 +8612,10 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State, CurType = State.getAttributedType( createSimpleAttr(State.getSema().Context, Attr), CurType, CurType); +return; } + State.getSema().Diag(Attr.getLoc(), diag::err_

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/118281 Emit the "cannot be applied to types" warning instead of silently ignoring the attribute when it's attempted to be used on a type (instead of a function argument or the function definition). Before this c

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/118281 >From ffba96ae0b32a25b810c46c46e9c360c3eef400d Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 2 Dec 2024 10:03:25 + Subject: [PATCH] [clang] Warn [[clang::lifetimebound]] misusages on types Em

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -9,11 +9,20 @@ namespace usage_invalid { ~A() [[clang::lifetimebound]]; // expected-error {{cannot be applied to a destructor}} static int *static_class_member() [[clang::lifetimebound]]; // expected-error {{static member function has no implicit object parameter}}

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google ready_for_review https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/118281 >From ffba96ae0b32a25b810c46c46e9c360c3eef400d Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Mon, 2 Dec 2024 10:03:25 + Subject: [PATCH 1/4] [clang] Warn [[clang::lifetimebound]] misusages on types

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > Can you add a note in llvm-project/clang/docs/ReleaseNotes.rst? done - thanks for pointing this out. https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -8612,7 +8612,11 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State, CurType = State.getAttributedType( createSimpleAttr(State.getSema().Context, Attr), CurType, CurType); +return; } + State.getSema().Diag(Attr.getLoc(), diag::err_

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-02 Thread Maksim Ivanov via cfe-commits
@@ -9,11 +9,20 @@ namespace usage_invalid { ~A() [[clang::lifetimebound]]; // expected-error {{cannot be applied to a destructor}} static int *static_class_member() [[clang::lifetimebound]]; // expected-error {{static member function has no implicit object parameter}}

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/118501 The reland can go in after we fixed downstream codebases that had incorrectly placed attributes. Original commit description: Emit the "cannot be applied to types" warning instead of silently ignoring the

[clang] [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118281)

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Thanks for the reviews! Please merge the PR (I don't have write access). https://github.com/llvm/llvm-project/pull/118281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @hokein @ilya-biryukov https://github.com/llvm/llvm-project/pull/118501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-04 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Thanks for the review and for the merge! > Not sure how well maintained these are either, but since they still exist, > LGTM If you mean the `lldbDataFormatters.py` script, then I don't know either, but at least when I tried it it turned out to be useful. https://github.c

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/118567 Emit a bit more informative error when the `[[clang::lifetimebound]]` attribute is wrongly appearing on a decl-spec: "'lifetimebound' attribute only applies to parameters and implicit object parameters",

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @hokein @ilya-biryukov https://github.com/llvm/llvm-project/pull/118567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-03 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @Michael137 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] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-05 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/118567 >From 204069c8e11db15f0b716d09cab58398b9399598 Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Tue, 3 Dec 2024 22:49:09 + Subject: [PATCH 1/2] [clang] Informative error for lifetimebound in decl-spec

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-05 Thread Maksim Ivanov via cfe-commits
@@ -3703,8 +3703,14 @@ void Parser::ParseDeclarationSpecifiers( // We reject AT_LifetimeBound and AT_AnyX86NoCfCheck, even though they // are type attributes, because we historically haven't allowed these // to be used as type attributes in C++11

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-05 Thread Maksim Ivanov via cfe-commits
@@ -3703,8 +3703,14 @@ void Parser::ParseDeclarationSpecifiers( // We reject AT_LifetimeBound and AT_AnyX86NoCfCheck, even though they // are type attributes, because we historically haven't allowed these // to be used as type attributes in C++11

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2025-01-10 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/118567 >From 85d3f923e6ae8aa707020dce67892cf4fae73415 Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Tue, 3 Dec 2024 22:49:09 + Subject: [PATCH 1/2] [clang] Informative error for lifetimebound in decl-spec

[clang] [clang] Refactor attr diagnostics to use %select (PR #122473)

2025-01-10 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google ready_for_review https://github.com/llvm/llvm-project/pull/122473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Refactor attr diagnostics to use %select (PR #122473)

2025-01-10 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/122473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Refactor attr diagnostics to use %select (PR #122473)

2025-01-10 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/122473 None >From 67c2e435e7030ca417e685cfa98e39b79248687e Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Fri, 10 Jan 2025 15:10:52 + Subject: [PATCH] [clang] Refactor attr diagnostics to use %select ---

[clang] [clang] Refactor attr diagnostics to use %select (PR #122473)

2025-01-10 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @ilya-biryukov You suggested previously (https://github.com/llvm/llvm-project/pull/118567/files#r1868729303) to introduce a separate enum, but I didn't manage to do it so far. Instead, I added new strings to `AttributeDeclKind`. My thinking has been: 1. If we create a enum

[clang] [clang] Refactor attr diagnostics to use %select (PR #122473)

2025-01-10 Thread Maksim Ivanov via cfe-commits
@@ -3708,9 +3709,9 @@ void Parser::ParseDeclarationSpecifiers( continue; if (PA.getKind() == ParsedAttr::AT_LifetimeBound) -Diag(PA.getLoc(), diag::err_attribute_wrong_decl_type_str) emaxx-google wrote: There are callsites le

[clang] [clang] Refactor attr diagnostics to use %select (PR #122473)

2025-01-10 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/122473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2025-01-10 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: #122473 is the promised follow-up for the diag. https://github.com/llvm/llvm-project/pull/118501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2025-01-10 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: #122473 is the promised follow-up for the diag. https://github.com/llvm/llvm-project/pull/118567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix misc-unused-parameters on params with attrs (PR #122286)

2025-01-09 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google created https://github.com/llvm/llvm-project/pull/122286 Don't suggest to comment-out the parameter name if the parameter has an attribute that's spelled after the parameter name. This prevents the parameter's attributes from being wrongly applied to the parame

[clang-tools-extra] [clang-tidy] Fix misc-unused-parameters on params with attrs (PR #122286)

2025-01-09 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/122286 >From 3faba8c3df1901d9fb58bf0d087a2a832ac9f04a Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Thu, 9 Jan 2025 14:59:35 + Subject: [PATCH] [clang-tidy] Fix misc-unused-parameters on params with attrs

[clang-tools-extra] [clang-tidy] Fix misc-unused-parameters on params with attrs (PR #122286)

2025-01-09 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/122286 >From 3faba8c3df1901d9fb58bf0d087a2a832ac9f04a Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Thu, 9 Jan 2025 14:59:35 + Subject: [PATCH 1/2] [clang-tidy] Fix misc-unused-parameters on params with

[clang-tools-extra] [clang-tidy] Fix misc-unused-parameters on params with attrs (PR #122286)

2025-01-09 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: @usx95 https://github.com/llvm/llvm-project/pull/122286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix misc-unused-parameters on params with attrs (PR #122286)

2025-01-09 Thread Maksim Ivanov via cfe-commits
@@ -26,6 +29,17 @@ bool isOverrideMethod(const FunctionDecl *Function) { return MD->size_overridden_methods() > 0 || MD->hasAttr(); return false; } + +bool hasAttrAfterParam(const SourceManager *SourceManager, + const ParmVarDecl *Param) { + for (co

[clang-tools-extra] [clang-tidy] Fix misc-unused-parameters on params with attrs (PR #122286)

2025-01-09 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/122286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2025-01-09 Thread Maksim Ivanov via cfe-commits
@@ -8612,7 +8612,11 @@ static void HandleLifetimeBoundAttr(TypeProcessingState &State, CurType = State.getAttributedType( createSimpleAttr(State.getSema().Context, Attr), CurType, CurType); +return; } + State.getSema().Diag(Attr.getLoc(), diag::err_

[clang] (reland) [clang] Warn [[clang::lifetimebound]] misusages on types (PR #118501)

2025-01-09 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Also: I didn't proceed with this PR because internal cleanup in Google's internal code base took time, but as this is finished now the PR could be merged. https://github.com/llvm/llvm-project/pull/118501 ___ cfe-commits mailing li

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-05 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > I had a closer look, but I get plenty of compile errors already on `main` - > including > > ``` > ./head15.h:20:7: error: use of overloaded operator '=' is ambiguous (with > operand types 'std::vector' and > 'strings_internal::Splitter strings_internal::SelectDelimiter::

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-10 Thread Maksim Ivanov via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-10 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google approved this pull request. https://github.com/llvm/llvm-project/pull/133910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-10 Thread Maksim Ivanov via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-08 Thread Maksim Ivanov via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-08 Thread Maksim Ivanov via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-08 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/133910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-08 Thread Maksim Ivanov via cfe-commits
@@ -121,6 +305,25 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, if (!Consumer) return nullptr; + std::vector> Consumers; + llvm::StringRef DumpDeserializedDeclarationRangesPath = + CI.getFrontendOpts().DumpMinimizationHintsPath; + if (!DumpDe

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-08 Thread Maksim Ivanov via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-11 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > > Here's a new reproducer, this time verifying that a semi-fresh > > tip-of-the-tree doesn't trigger the same error: > > https://pastebin.com/7tYfjazz. Apologies for the delay. > > Thanks. I gave it a try, but I don't see any `use of overloaded operator '=' > is ambiguou

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > It is not clear to me why this is a specifically a problem when called from > `Profile(...)` can you elaborate a bit more in the summary. I've added a bit more details - it's basically the fact that the "get most recent" operation triggered the load of new nodes from the

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/137910 >From b31a3f86d3427405f1182d59c381e90c93e521b8 Mon Sep 17 00:00:00 2001 From: Maksim Ivanov Date: Wed, 30 Apr 2025 00:31:30 + Subject: [PATCH 1/2] [clang] Fix nondeterminism in MemberPointerType This c

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-29 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google ready_for_review https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-10 Thread Maksim Ivanov via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-10 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Here's a new reproducer, this time verifying that a semi-fresh tip-of-the-tree doesn't trigger the same error: https://pastebin.com/7tYfjazz. Apologies for the delay. https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commit

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-05 Thread Maksim Ivanov via cfe-commits
@@ -367,12 +367,6 @@ bool RedeclarableTemplateDecl::loadLazySpecializationsImpl( if (!ExternalSource) return false; - // If TPL is not null, it implies that we're loading specializations for - // partial templates. We need to load all specializations in such cases. -

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/137910 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > I'm still not sure I understand the problem this is solving, but I also don't > see any harm in it, so I'm leaning towards accept here. Aaron can be the > final approval though. @AaronBallman I'd like to proceed with landing this as a short-term fix for the nondeterminis

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
@@ -3602,6 +3602,10 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } NestedNameSpecifier *getQualifier() const { return Qualifier; } + CXXRecordDecl *getCXXRecordDecl() const; emaxx-google wrote: Sure, done. @mizvekov I'll also

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-05 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: An update: The miminization of the reproducer is sadly still ongoing. A longer version of this TLDR: --- As the reduction was making slow progress, I've tried the proposal from @vgvassilev to add the "successfully compiles in the non-modular mode" criterion to the interes

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Thanks everyone! https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > Approving to land this and unblock our internal releases. Obviously, I > encourage to address the issues raised by other reviewers in the follow-ups. > > In particular, the most easily actionable one is about the naming of the > getter from @mizvekov . Let's wait for the

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google closed https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google updated https://github.com/llvm/llvm-project/pull/137910 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-05-05 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > I think this is fine as a temporary hack, but please add a FIXME comment > explaining that this is working around a deeper underlying issue. Sure, done. https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing li

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

2025-04-23 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Hello, the minimized reproducer for the determinism issue is there: https://pastebin.com/6aL6rmBe . To build it, unpack it into separate files (via `split-file`), then run `CLANG=path/to/clang make`. The nondeterminism can be checked by looping `make clean` + `make` + `md5s

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-15 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Understood. JFYI I've been running another minimization task, this time without the `-fallow-pcm-with-compiler-errors` parameter, so that all modules compile correctly and the result is easier to comprehend, but it obviously takes a lot longer to reduce - so far it's still

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-15 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Hello, here's the new reproducer (which compiles "before" and also in non-module mode, but not "after"): https://pastebin.com/zawQv7Q6 . Hopefully this time it's more useful than the previous attempts. https://github.com/llvm/llvm-project/pull/133057 ___

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-19 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > Two observations: > > 1. There is a diamond module structure: Both `4BK.pcm` and `LUM.pcm` depend > on `WI9.pcm` and contain `2OT.h` with different module names (I removed > transitive empty includes). I'm not sure if this is valid... @emaxx-google is > it possible to sh

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-05-19 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > I'm not so sure it's about conversion function templates in particular: if > it's really commit > [658d55b](https://github.com/llvm/llvm-project/commit/658d55ba1117a029f37f51a3072585a1fd9fc59f) > causing the problem (@emaxx-google if you happen to have some time, it would