@@ -724,6 +724,9 @@ enum ASTRecordTypes {
/// Record code for vtables to emit.
VTABLES_TO_EMIT = 70,
+
+ /// Record code for the FunctionDecl to lambdas mapping.
dmpolukhin wrote:
Done
https://github.com/llvm/llvm-project/pull/109167
___
@@ -4351,6 +4351,15 @@ void
ASTReader::loadDeclUpdateRecords(PendingUpdateRecord &Record) {
reader::ASTDeclContextNameLookupTrait(*this, *Update.Mod));
DC->setHasExternalVisibleStorage(true);
}
+
+ // Load any pending lambdas for the function.
+ if (auto *FD
@@ -233,6 +233,10 @@ class ASTWriter : public ASTDeserializationListener,
/// instead of comparing the result of `getDeclID()` or `GetDeclRef()`.
llvm::SmallPtrSet PredefinedDecls;
+ /// Map that provides the ID of function to the vector of lambdas inside it.
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/109167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin commented:
All comments resolved, also I added TODO that we might want to use ondisk hash
table to allow lazy deserialization for the new record.
https://github.com/llvm/llvm-project/pull/109167
___
cfe-commits mailing li
@@ -532,6 +532,10 @@ class ASTReader
/// namespace as if it is not delayed.
DelayedNamespaceOffsetMapTy DelayedNamespaceOffsetMap;
+ /// Mapping from FunctionDecl IDs to the corresponding lambda IDs.
dmpolukhin wrote:
Done
https://github.com/llvm/llvm-p
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/109167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin closed
https://github.com/llvm/llvm-project/pull/112883
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dmpolukhin wrote:
FYI, in our internal testing we also found a case when this PR fixes issue.
Also we don't see any examples when it may break something so I think we should
merge it ASAP because it fixes known issues and don't have any known
regressions.
@alexfh what is the ETA for release t
dmpolukhin wrote:
@alexfh and @ilya-biryukov do you have any updates?
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dmpolukhin wrote:
> The missing bit was `-O1`, as soon as I've added that, I am now getting the
> error with this commit and not getting any error without this commit. Here is
> a proper reproducer:
> [friends.tgz](https://github.com/user-attachments/files/17950471/friends.tgz)
Thank you for
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/111992
>From 3eaaa7d70f4b57cc13bd00bd3a3a921f7914d599 Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Fri, 11 Oct 2024 05:35:18 -0700
Subject: [PATCH 1/4] [C++20][Modules] Load function body from the module tha
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/111992
>From 3eaaa7d70f4b57cc13bd00bd3a3a921f7914d599 Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Fri, 11 Oct 2024 05:35:18 -0700
Subject: [PATCH 1/5] [C++20][Modules] Load function body from the module tha
dmpolukhin wrote:
@ilya-biryukov could you please test the latest version on your sources?
It seems that I found generic enough solution for the problem when clang uses
merged decl with no body for template instantiation. See changes in
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp.
https://
https://github.com/dmpolukhin commented:
Updated PR
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/111992
>From 3eaaa7d70f4b57cc13bd00bd3a3a921f7914d599 Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Fri, 11 Oct 2024 05:35:18 -0700
Subject: [PATCH 1/6] [C++20][Modules] Load function body from the module tha
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1976,14 +1976,16 @@
TemplateDeclInstantiator::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) {
if (!InstParams)
return nullptr;
+ // Use canonical templated decl because only canonical decl has body
+ // if declarations were merged during loading from modules.
https://github.com/dmpolukhin commented:
LGTM but let @ChuanqiXu9 approve.
https://github.com/llvm/llvm-project/pull/121245
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/121245
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,90 @@
+// RUN: rm -rf %t
dmpolukhin wrote:
Please add a comment that the test results in `llvm_unreachable` in debug
builds so debug build should be used to investigate problems with the test.
https://github.com/llvm/llvm-project/pull/121245
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/111992
>From 3eaaa7d70f4b57cc13bd00bd3a3a921f7914d599 Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Fri, 11 Oct 2024 05:35:18 -0700
Subject: [PATCH 1/7] [C++20][Modules] Load function body from the module tha
@@ -1976,14 +1976,16 @@
TemplateDeclInstantiator::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) {
if (!InstParams)
return nullptr;
+ // Use canonical templated decl because only canonical decl has body
+ // if declarations were merged during loading from modules.
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin commented:
> The two problems I see are:
>
> * invalid `no matching constructor for initialization of` errors for some
> particular type,
I think it is due to applying my changes too wide (i.e. to normal member
functions and use first decl for them). I hope I fix
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/111992
>From 3eaaa7d70f4b57cc13bd00bd3a3a921f7914d599 Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Fri, 11 Oct 2024 05:35:18 -0700
Subject: [PATCH 1/8] [C++20][Modules] Load function body from the module tha
dmpolukhin wrote:
FYI, I tested the latest version on our reproducers and it fixed all known
issues due to friend inline functions.
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
https://github.com/dmpolukhin closed
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dmpolukhin wrote:
@ilya-biryukov and @ChuanqiXu9 thank you for your help with the review, testing
and reproducers. Very appreciated!
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/111992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/111992
>From 3eaaa7d70f4b57cc13bd00bd3a3a921f7914d599 Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Fri, 11 Oct 2024 05:35:18 -0700
Subject: [PATCH 1/9] [C++20][Modules] Load function body from the module tha
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/111992
>From d71fb50ca68448578b797bb85f3a607dc9739d45 Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Fri, 11 Oct 2024 05:35:18 -0700
Subject: [PATCH 1/9] [C++20][Modules] Load function body from the module tha
dmpolukhin wrote:
I do believe that the issue about ODR violation cannot be caused by this change
itself. I suggest merging this PR as is and I'll take a look at the reproducer
as soon as you create it. This PR fixes known issues with reproducers so I'm in
doubt what makes this change so speci
dmpolukhin wrote:
@ilya-biryukov unfortunately it seems that the reproducer is very sensitive to
the exact clang revision. I tried it with current main
b8eef18868570b2f5244d6d43de02a1812d1c880 and this PR on top of the revision. In
both cases I don't see any problems at all (no errors, no warn
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/123648
>From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Mon, 20 Jan 2025 09:03:25 -0800
Subject: [PATCH 1/2] [C++20][Modules] Fix crash/compiler error due broken AS
@@ -1571,9 +1571,10 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D)
{
} else {
Record.push_back(0);
}
-// For lambdas inside canonical FunctionDecl remember the mapping.
+// For lambdas inside template functions, remember the mapping to
+/
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/123648
>From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Mon, 20 Jan 2025 09:03:25 -0800
Subject: [PATCH 1/3] [C++20][Modules] Fix crash/compiler error due broken AS
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/123648
>From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Mon, 20 Jan 2025 09:03:25 -0800
Subject: [PATCH 1/7] [C++20][Modules] Fix crash/compiler error due broken AS
@@ -799,14 +813,14 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
}
if (D->getFriendObjectKind()) {
-// For a function defined inline within a class template, we have to force
-// the canonical definition to be the one inside the canonical definition
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/123648
>From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Mon, 20 Jan 2025 09:03:25 -0800
Subject: [PATCH 1/6] [C++20][Modules] Fix crash/compiler error due broken AS
@@ -799,14 +817,12 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) {
}
if (D->getFriendObjectKind()) {
-// For a function defined inline within a class template, we have to force
-// the canonical definition to be the one inside the canonical definition
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/123648
>From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Mon, 20 Jan 2025 09:03:25 -0800
Subject: [PATCH 1/5] [C++20][Modules] Fix crash/compiler error due broken AS
@@ -539,11 +539,12 @@ class ASTReader
/// Mapping from main decl ID to the related decls IDs.
///
- /// These related decls have to be loaded right after the main decl.
- /// It is required to have canonical declaration for related decls from the
- /// same module as th
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/123648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin commented:
Added release note
https://github.com/llvm/llvm-project/pull/123648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/123648
>From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Mon, 20 Jan 2025 09:03:25 -0800
Subject: [PATCH 1/4] [C++20][Modules] Fix crash/compiler error due broken AS
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/123648
>From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Mon, 20 Jan 2025 09:03:25 -0800
Subject: [PATCH 1/7] [C++20][Modules] Fix crash/compiler error due broken AS
https://github.com/dmpolukhin closed
https://github.com/llvm/llvm-project/pull/123648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin created
https://github.com/llvm/llvm-project/pull/123648
Summary:
This PR fixes bugreport https://github.com/llvm/llvm-project/issues/122493 The
root problem is the same as before lambda function and DeclRefExpr references a
variable that does not belong to the sa
dmpolukhin wrote:
@zixu-w and @ChuanqiXu9 Just want to clarify policies about changes reversion.
As far as I understand it was one example in some private codebase with no
reproducer publicly available. I can understand and completely agree if it
breaks any existing test or llvm-build bot. But
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin closed
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 1/4] [clang] Fix for regression #130917
Changes in #111992
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 1/3] [clang] Fix for regression #130917
Changes in #111992
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
// Friend function defined withing class template may stop being function
// definition during AST merges from different modules, in this case decl
// with function body should be used for instantiat
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 1/5] [clang] Fix for regression #130917
Changes in #111992
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 1/6] [clang] Fix for regression #130917
Changes in #111992
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
// Friend function defined withing class template may stop being function
// definition during AST merges from different modules, in this case decl
// with function body should be used for instantiat
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 01/10] [clang] Fix for regression #130917
Changes in #11199
@@ -1392,6 +1392,20 @@ class ASTReader
llvm::DenseMap DefinitionSource;
+ /// The set of extra flags about declarations that we have read from
+ /// the module file.
+ struct ExternalDeclarationBits {
+/// Indicates if given function declaration was a definition but
dmpolukhin wrote:
> LGTM.
>
> But I didn't recognize you didn't update `MultiplexExternalSemaSource`. Every
> time we add new interface to `ExternalASTSource`, we need to update
> `MultiplexExternalSemaSource` too.
Oh, thanks for the good catch! Fixed now.
https://github.com/llvm/llvm-projec
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin commented:
PTAL
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 01/11] [clang] Fix for regression #130917
Changes in #11199
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin created
https://github.com/llvm/llvm-project/pull/132214
Changes in #111992 was too broad. This change reduces scope of previous fix.
Unfortunately in clang there is no way to know when redeclaration was craeted
artificially due to AST mergse and when it was the c
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2572,7 +2572,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
// Friend function defined withing class template may stop being function
// definition during AST merges from different modules, in this case decl
// with function body should be used for instantiat
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1390,7 +1390,19 @@ class ASTReader
/// predefines buffer may contain additional definitions.
std::string SuggestedPredefines;
- llvm::DenseMap DefinitionSource;
+ struct DefinitionSourceFlags {
dmpolukhin wrote:
Done
https://github.com/llvm/llvm-pr
@@ -1390,7 +1390,19 @@ class ASTReader
/// predefines buffer may contain additional definitions.
std::string SuggestedPredefines;
- llvm::DenseMap DefinitionSource;
+ struct DefinitionSourceFlags {
+ExtKind HasExternalDefinitions : 2;
+
+/// Indicates if given fu
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 1/7] [clang] Fix for regression #130917
Changes in #111992
https://github.com/dmpolukhin updated
https://github.com/llvm/llvm-project/pull/132214
>From 91e057bf990e2c454b897982ed0b4e823bb3faba Mon Sep 17 00:00:00 2001
From: Dmitry Polukhin
Date: Thu, 20 Mar 2025 06:51:46 -0700
Subject: [PATCH 1/9] [clang] Fix for regression #130917
Changes in #111992
https://github.com/dmpolukhin edited
https://github.com/llvm/llvm-project/pull/132214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
301 - 375 of 375 matches
Mail list logo