llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin`
running on `doug-worker-4` while building `clang` at step 2 "checkout".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/190/builds/11848
Here is the relevant piece of the bu
github-actions[bot] wrote:
@amane-ame Congratulations on having your first Pull Request (PR) merged into
the LLVM Project!
Your changes will be combined with recent changes from other authors, then
tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a
problem with a buil
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/119428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH 1/7] Fix crashes when the macro expansion is empty
---
clang/lib/F
https://github.com/owenca approved this pull request.
https://github.com/llvm/llvm-project/pull/119428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/119428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -217,6 +219,31 @@ TEST_F(MacroCallReconstructorTest, Identifier) {
EXPECT_THAT(std::move(Unexp).takeResult(),
matchesLine(line(U.consume("X";
}
+TEST_F(MacroCallReconstructorTest, IdentifierObject) {
owenca wrote:
How about`EmptyDefinition` instead
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH 1/6] Fix crashes when the macro expansion is empty
---
clang/lib/F
@@ -0,0 +1,5 @@
+// RUN: grep -Ev "// *[A-Z-]+:" %s | clang-format -style="{Macros: [A(x)=x]}" \
+// RUN: | FileCheck -strict-whitespace %s
+
+// CHECK: A()
+A()
amane-ame wrote:
Sorry for misunderstood.
https://github.com/llvm/llvm-project/pull/119428
___
@@ -0,0 +1,5 @@
+// RUN: grep -Ev "// *[A-Z-]+:" %s | clang-format -style="{Macros: [A(x)=x]}" \
+// RUN: | FileCheck -strict-whitespace %s
+
+// CHECK: A()
+A()
owenca wrote:
Don't add a lit test. Instead, add a unittest similar to the one you already
added
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH 1/6] Fix crashes when the macro expansion is empty
---
clang/lib/F
https://github.com/owenca commented:
Please add a test case for
https://github.com/llvm/llvm-project/issues/119258#issue-2728126922.
https://github.com/llvm/llvm-project/pull/119428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
@@ -233,6 +233,10 @@ MacroExpander::expand(FormatToken *ID,
if (Result.size() > 1) {
++Result[0]->MacroCtx->StartOfExpansion;
++Result[Result.size() - 2]->MacroCtx->EndOfExpansion;
+ } else {
+// If the macro expansion is empty, mark the start and end
---
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH 1/4] Fix crashes when the macro expansion is empty
---
clang/lib/F
@@ -217,6 +217,19 @@ TEST_F(MacroCallReconstructorTest, Identifier) {
EXPECT_THAT(std::move(Unexp).takeResult(),
matchesLine(line(U.consume("X";
}
+TEST_F(MacroCallReconstructorTest, EmptyExpansion) {
+ auto Macros = createExpander({"A(x)=y"});
owenca
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH 1/3] Fix crashes when the macro expansion is empty
---
clang/lib/F
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff f4081711f0884ec7afe93577e118ecc89cb7b1cf
1e79973ed4ea56c66f8b7eb1db9d00784edac7f0 --e
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH 1/3] Fix crashes when the macro expansion is empty
---
clang/lib/F
owenca wrote:
You should add unit tests in `clang/unittests/Format/`.
https://github.com/llvm/llvm-project/pull/119428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH 1/2] Fix crashes when the macro expansion is empty
---
clang/lib/F
owenca wrote:
Please add unit tests.
https://github.com/llvm/llvm-project/pull/119428
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amane-ame updated
https://github.com/llvm/llvm-project/pull/119428
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed, 11 Dec 2024 02:13:43 +0800
Subject: [PATCH] Fix crashes when the macro expansion is empty
---
clang/lib/Forma
github-actions[bot] wrote:
Thank you for submitting a Pull Request (PR) to the LLVM Project!
This PR will be automatically labeled and the relevant teams will be notified.
If you wish to, you can add reviewers by using the "Reviewers" section on this
page.
If this is not working for you, it
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: 天音あめ (amane-ame)
Changes
An empty expansion should be valid, like `echo 'A()' | clang-format
--style='{Macros: [A(x)=x]}'`
See #119258.
---
Full diff: https://github.com/llvm/llvm-project/pull/119428.diff
1 Files Affected:
- (mo
https://github.com/amane-ame created
https://github.com/llvm/llvm-project/pull/119428
An empty expansion should be valid, like `echo 'A()' | clang-format
--style='{Macros: [A(x)=x]}'`
See #119258.
From 3a4c1a924faef3a7a09126694fcb943bd7083451 Mon Sep 17 00:00:00 2001
From: amane-ame
Date: Wed
25 matches
Mail list logo