@@ -14,4 +15,13 @@ auto r2 = l2();
auto r3 = l2();
// CHECK: TWO
-%quit
+// Verify non-local lambda capture error is correctly reported
+int x = 42;
+
+// expected-error {{non-local lambda expression cannot have a capture-default}}
+auto capture = [&]() { return x * 2; };
+
--
https://github.com/vgvassilev approved this pull request.
Lgtm!
https://github.com/llvm/llvm-project/pull/127467
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From bd1b0b2a14afeb73755db3a7deb6bffd4f50778c Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH 1/3] Fix error recovery while PTU cleanup
---
clang/lib/Interpr
https://github.com/vgvassilev approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/127467
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From bd1b0b2a14afeb73755db3a7deb6bffd4f50778c Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH 1/2] Fix error recovery while PTU cleanup
---
clang/lib/Interpr
@@ -1,7 +1,8 @@
// REQUIRES: host-supports-jit
// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl | FileCheck %s
-// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s
+// RUN: cat %s | not clang-repl -Xcc -Xclang -Xcc -verify -Xcc -O2 | FileCheck
%s
vgvassi
@@ -1,7 +1,8 @@
// REQUIRES: host-supports-jit
// UNSUPPORTED: system-aix
// RUN: cat %s | clang-repl | FileCheck %s
-// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s
+// RUN: cat %s | not clang-repl -Xcc -Xclang -Xcc -verify -Xcc -O2 | FileCheck
%s
anutosh
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH 1/5] Fix error recovery while PTU cleanup
---
clang/lib/Interpr
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From bd1b0b2a14afeb73755db3a7deb6bffd4f50778c Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH] Fix error recovery while PTU cleanup
---
clang/lib/Interpreter
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH 1/4] Fix error recovery while PTU cleanup
---
clang/lib/Interpr
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH 1/3] Fix error recovery while PTU cleanup
---
clang/lib/Interpr
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH 1/3] Fix error recovery while PTU cleanup
---
clang/lib/Interpr
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) {
RecoverErr = Interp->Parse("var1 = 424;");
EXPECT_TRUE(!!RecoverErr);
+
+ Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2;
};").takeError();
anutosh491 wrote:
Shall shift it ther
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) {
RecoverErr = Interp->Parse("var1 = 424;");
EXPECT_TRUE(!!RecoverErr);
+
+ Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2;
};").takeError();
anutosh491 wrote:
I meant I see quite
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) {
RecoverErr = Interp->Parse("var1 = 424;");
EXPECT_TRUE(!!RecoverErr);
+
+ Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2;
};").takeError();
vgvassilev wrote:
There is no such a
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) {
RecoverErr = Interp->Parse("var1 = 424;");
EXPECT_TRUE(!!RecoverErr);
+
+ Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2;
};").takeError();
anutosh491 wrote:
Hmmm @vgvassilev
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) {
RecoverErr = Interp->Parse("var1 = 424;");
EXPECT_TRUE(!!RecoverErr);
+
+ Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2;
};").takeError();
vgvassilev wrote:
Can we move this te
https://github.com/anutosh491 updated
https://github.com/llvm/llvm-project/pull/127467
>From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001
From: anutosh491
Date: Mon, 17 Feb 2025 15:33:20 +0530
Subject: [PATCH 1/2] Fix error recovery while PTU cleanup
---
clang/lib/Interpr
@@ -178,8 +178,8 @@ void IncrementalParser::CleanUpPTU(TranslationUnitDecl
*MostRecentTU) {
if (!ND)
continue;
// Check if we need to clean up the IdResolver chain.
-if (ND->getDeclName().getFETokenInfo() && !D->getLangOpts().ObjC &&
-!D->getLangOpts(
anutosh491 wrote:
cc @vgvassilev
https://github.com/llvm/llvm-project/pull/127467
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/anutosh491 edited
https://github.com/llvm/llvm-project/pull/127467
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
21 matches
Mail list logo