https://github.com/balazske closed
https://github.com/llvm/llvm-project/pull/72841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
https://github.com/NagyDonat approved this pull request.
Thanks for the clarifications, LGTM. As others had lots of opportunities to
comment on this change, I think it's safe to merge this now (assuming that the
@@ -6245,17 +6245,21 @@ ExpectedDecl
ASTNodeImporter::VisitVarTemplateDecl(VarTemplateDecl *D) {
D->getTemplatedDecl()))
continue;
if (IsStructuralMatch(D, FoundTemplate)) {
-// The Decl in the "From" context
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -6245,17 +6245,21 @@ ExpectedDecl
ASTNodeImporter::VisitVarTemplateDecl(VarTemplateDecl *D) {
D->getTemplatedDecl()))
continue;
if
@@ -5050,6 +5050,59 @@ TEST_P(ImportFriendClasses, RecordVarTemplateDecl) {
EXPECT_EQ(ToTUX, ToX);
}
+TEST_P(ASTImporterOptionSpecificTestBase, VarTemplateDeclConflict) {
+ getToTuDecl(
+ R"(
+ template
+ constexpr int X = 1;
+ )",
+ Lang_CXX14);
=?utf-8?q?Balázs_Kéri?= ,
=?utf-8?q?Balázs_Kéri?=
Message-ID:
In-Reply-To:
@@ -5050,6 +5050,59 @@ TEST_P(ImportFriendClasses, RecordVarTemplateDecl) {
EXPECT_EQ(ToTUX, ToX);
}
+TEST_P(ASTImporterOptionSpecificTestBase, VarTemplateDeclConflict) {
+ getToTuDecl(
+
@@ -5050,6 +5050,59 @@ TEST_P(ImportFriendClasses, RecordVarTemplateDecl) {
EXPECT_EQ(ToTUX, ToX);
}
+TEST_P(ASTImporterOptionSpecificTestBase, VarTemplateDeclConflict) {
+ getToTuDecl(
+ R"(
+ template
+ constexpr int X = 1;
+ )",
+ Lang_CXX14);
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/72841
From 99d6169f62862b7b1147da7fd26a85df20a0aba5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 20 Nov 2023 10:14:52 +0100
Subject: [PATCH 1/3] [clang][ASTImporter] Fix import of
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
@@ -5050,6 +5050,59 @@ TEST_P(ImportFriendClasses, RecordVarTemplateDecl) {
EXPECT_EQ(ToTUX, ToX);
}
+TEST_P(ASTImporterOptionSpecificTestBase, VarTemplateDeclConflict) {
+ getToTuDecl(
+ R"(
+
balazske wrote:
I plan to fix import of `VarTemplateSpecializationDecl` in a different PR. The
indicated assertion "Missing call to MapImported?" is likely to related to this
part.
https://github.com/llvm/llvm-project/pull/72841
___
cfe-commits
https://github.com/balazske updated
https://github.com/llvm/llvm-project/pull/72841
From 99d6169f62862b7b1147da7fd26a85df20a0aba5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?=
Date: Mon, 20 Nov 2023 10:14:52 +0100
Subject: [PATCH 1/2] [clang][ASTImporter] Fix import of
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Balázs Kéri (balazske)
Changes
In some cases variable templates (specially if static member of record) were
not correctly imported and an assertion "Missing call to MapImported?" could
happen.
---
Full diff:
https://github.com/balazske created
https://github.com/llvm/llvm-project/pull/72841
In some cases variable templates (specially if static member of record) were
not correctly imported and an assertion "Missing call to MapImported?" could
happen.
From 99d6169f62862b7b1147da7fd26a85df20a0aba5
13 matches
Mail list logo