[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> > Now I wonder if the fix should be with the (void) or without. Have you 
> > tried it locally to see if you get the same build error?
> 
> Yes, I just tried your patch and confirmed that the unit test passes without 
> a problem.
> 
> No, you shouldn't keep `(void)` there. It's there just to silence the warning 
> because the lambda is sitting unused outside the call to 
> `PrintedDeclCXX98Matches`. Once you bring the lambda inside the call to 
> `PrintedDeclCXX98Matches`, the lambda is used, so you shouldn't get a warning.

Perfect! As soon as the testing completes I will merge it in. Thanks.

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Kazu Hirata via cfe-commits

kazutakahirata wrote:

> Now I wonder if the fix should be with the (void) or without. Have you tried 
> it locally to see if you get the same build error?

Yes, I just tried your patch and confirmed that the unit test passes without a 
problem.

No, you shouldn't keep `(void)` there.  It's there just to silence the warning 
because the lambda is sitting unused outside the call to 
`PrintedDeclCXX98Matches`.  Once you bring the lambda inside the call to 
`PrintedDeclCXX98Matches`, the lambda is used, so you shouldn't get a warning.

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam updated 
https://github.com/llvm/llvm-project/pull/86741

>From 8d113344d0742f80bc967019131c9111a0db78ff Mon Sep 17 00:00:00 2001
From: Zahira Ammarguellat 
Date: Tue, 26 Mar 2024 14:21:16 -0700
Subject: [PATCH] Fix buildbot
 https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio

---
 clang/unittests/AST/DeclPrinterTest.cpp | 54 +
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/clang/unittests/AST/DeclPrinterTest.cpp 
b/clang/unittests/AST/DeclPrinterTest.cpp
index 07fa02bd96e25d..f2b027a25621ce 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -1387,34 +1387,38 @@ TEST(DeclPrinter, TestTemplateArgumentList16) {
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl17) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;",
-  "A", "Z A"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;",
+  "A", "Z A",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl18) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl19) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
+
 TEST(DeclPrinter, TestCXXRecordDecl20) {
   ASSERT_TRUE(PrintedDeclCXX98Matches(
   "template  class Inner;"
@@ -1431,8 +1435,8 @@ TEST(DeclPrinter, TestCXXRecordDecl20) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl21) {
@@ -1451,8 +1455,8 @@ TEST(DeclPrinter, TestCXXRecordDecl21) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
 
 TEST(DeclPrinter, TestFunctionParamUglified) {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> > > I thought the issue was fixed with the (void) addition! If not, I will 
> > > merge this PR immediately.
> > 
> > 
> > Sorry, I misunderstood. The `void` fix 
> > ([577e0ef](https://github.com/llvm/llvm-project/commit/577e0ef94fb0b4ba9f97a6f58a1961f7ba247d21))
> >  fixes the build error.
> > Meanwhile, I am guessing that you have added lambda functions to control 
> > the behavior of `PrintedDeclCXX98Matches`. If that's the case, you should 
> > merge this PR. But then again, there is no urgency as the build has been 
> > restored.
> 
> OK. I have edited the description since this is not for fixing the build as 
> much as fixing the call `PrintedDeclCXX98Matches`.

Now I wonder if the fix should be with the (void) or without. Have you tried it 
locally to see if you get the same build error?

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam updated 
https://github.com/llvm/llvm-project/pull/86741

>From 8d113344d0742f80bc967019131c9111a0db78ff Mon Sep 17 00:00:00 2001
From: Zahira Ammarguellat 
Date: Tue, 26 Mar 2024 14:21:16 -0700
Subject: [PATCH] Fix buildbot
 https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio

---
 clang/unittests/AST/DeclPrinterTest.cpp | 54 +
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/clang/unittests/AST/DeclPrinterTest.cpp 
b/clang/unittests/AST/DeclPrinterTest.cpp
index 07fa02bd96e25d..f2b027a25621ce 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -1387,34 +1387,38 @@ TEST(DeclPrinter, TestTemplateArgumentList16) {
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl17) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;",
-  "A", "Z A"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;",
+  "A", "Z A",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl18) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl19) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
+
 TEST(DeclPrinter, TestCXXRecordDecl20) {
   ASSERT_TRUE(PrintedDeclCXX98Matches(
   "template  class Inner;"
@@ -1431,8 +1435,8 @@ TEST(DeclPrinter, TestCXXRecordDecl20) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl21) {
@@ -1451,8 +1455,8 @@ TEST(DeclPrinter, TestCXXRecordDecl21) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
 
 TEST(DeclPrinter, TestFunctionParamUglified) {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam edited 
https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> > I thought the issue was fixed with the (void) addition! If not, I will 
> > merge this PR immediately.
> 
> Sorry, I misunderstood. The `void` fix 
> ([577e0ef](https://github.com/llvm/llvm-project/commit/577e0ef94fb0b4ba9f97a6f58a1961f7ba247d21))
>  fixes the build error.
> 
> Meanwhile, I am guessing that you have added lambda functions to control the 
> behavior of `PrintedDeclCXX98Matches`. If that's the case, you should merge 
> this PR. But then again, there is no urgency as the build has been restored.

OK. I have edited the description since this is not for fixing the build as 
much as fixing the call `PrintedDeclCXX98Matches`.

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Kazu Hirata via cfe-commits

kazutakahirata wrote:

> I thought the issue was fixed with the (void) addition! If not, I will merge 
> this PR immediately.

Sorry, I misunderstood.  The `void` fix 
(https://github.com/llvm/llvm-project/commit/577e0ef94fb0b4ba9f97a6f58a1961f7ba247d21)
 fixes the build error.

Meanwhile, I am guessing that you have added lambda functions to control the 
behavior of `PrintedDeclCXX98Matches`.  If that's the case, you should merge 
this PR.  But then again, there is no urgency as the build has been restored.

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

> Would you mind merging this PR into the LLVM source tree if nothing is 
> blocking you?
> 
> If something is blocking you, I am happy to revert your original patch on 
> your behalf (along with the `(void)` fix).

I thought the issue was fixed with the (void) addition! If not, I will merge 
this PR immediately. 

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-28 Thread Kazu Hirata via cfe-commits

kazutakahirata wrote:

Would you mind merging this PR into the LLVM source tree if nothing is blocking 
you?

If something is blocking you, I am happy to revert your original patch on your 
behalf (along with the `(void)` fix).

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-27 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam updated 
https://github.com/llvm/llvm-project/pull/86741

>From 8d113344d0742f80bc967019131c9111a0db78ff Mon Sep 17 00:00:00 2001
From: Zahira Ammarguellat 
Date: Tue, 26 Mar 2024 14:21:16 -0700
Subject: [PATCH] Fix buildbot
 https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio

---
 clang/unittests/AST/DeclPrinterTest.cpp | 54 +
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/clang/unittests/AST/DeclPrinterTest.cpp 
b/clang/unittests/AST/DeclPrinterTest.cpp
index 07fa02bd96e25d..f2b027a25621ce 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -1387,34 +1387,38 @@ TEST(DeclPrinter, TestTemplateArgumentList16) {
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl17) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;",
-  "A", "Z A"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;",
+  "A", "Z A",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl18) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl19) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
+
 TEST(DeclPrinter, TestCXXRecordDecl20) {
   ASSERT_TRUE(PrintedDeclCXX98Matches(
   "template  class Inner;"
@@ -1431,8 +1435,8 @@ TEST(DeclPrinter, TestCXXRecordDecl20) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl21) {
@@ -1451,8 +1455,8 @@ TEST(DeclPrinter, TestCXXRecordDecl21) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
 
 TEST(DeclPrinter, TestFunctionParamUglified) {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-26 Thread Kazu Hirata via cfe-commits

https://github.com/kazutakahirata approved this pull request.

LGTM.  Thanks!

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-26 Thread Zahira Ammarguellat via cfe-commits

zahiraam wrote:

Tagging @amy-kwan and @kazutakahirata . Hopefully this will fix the issue. 

https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-26 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Zahira Ammarguellat (zahiraam)


Changes

https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio

---
Full diff: https://github.com/llvm/llvm-project/pull/86741.diff


1 Files Affected:

- (modified) clang/unittests/AST/DeclPrinterTest.cpp (+29-25) 


``diff
diff --git a/clang/unittests/AST/DeclPrinterTest.cpp 
b/clang/unittests/AST/DeclPrinterTest.cpp
index 07fa02bd96e25d..f2b027a25621ce 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -1387,34 +1387,38 @@ TEST(DeclPrinter, TestTemplateArgumentList16) {
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl17) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;",
-  "A", "Z A"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;",
+  "A", "Z A",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl18) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl19) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
+
 TEST(DeclPrinter, TestCXXRecordDecl20) {
   ASSERT_TRUE(PrintedDeclCXX98Matches(
   "template  class Inner;"
@@ -1431,8 +1435,8 @@ TEST(DeclPrinter, TestCXXRecordDecl20) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl21) {
@@ -1451,8 +1455,8 @@ TEST(DeclPrinter, TestCXXRecordDecl21) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
 
 TEST(DeclPrinter, TestFunctionParamUglified) {

``




https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-26 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam ready_for_review 
https://github.com/llvm/llvm-project/pull/86741
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix buildbot failure. (PR #86741)

2024-03-26 Thread Zahira Ammarguellat via cfe-commits

https://github.com/zahiraam created 
https://github.com/llvm/llvm-project/pull/86741

https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio

>From 8d113344d0742f80bc967019131c9111a0db78ff Mon Sep 17 00:00:00 2001
From: Zahira Ammarguellat 
Date: Tue, 26 Mar 2024 14:21:16 -0700
Subject: [PATCH] Fix buildbot
 https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio

---
 clang/unittests/AST/DeclPrinterTest.cpp | 54 +
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/clang/unittests/AST/DeclPrinterTest.cpp 
b/clang/unittests/AST/DeclPrinterTest.cpp
index 07fa02bd96e25d..f2b027a25621ce 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -1387,34 +1387,38 @@ TEST(DeclPrinter, TestTemplateArgumentList16) {
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl17) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;",
-  "A", "Z A"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;",
+  "A", "Z A",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl18) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl19) {
-  ASSERT_TRUE(PrintedDeclCXX98Matches("template struct Z {};"
-  "struct X {};"
-  "Z A;"
-  "template "
-  "struct Y{};"
-  "Y, 2> B;",
-  "B", "Y, 2> B"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  ASSERT_TRUE(PrintedDeclCXX98Matches(
+  "template struct Z {};"
+  "struct X {};"
+  "Z A;"
+  "template "
+  "struct Y{};"
+  "Y, 2> B;",
+  "B", "Y, 2> B",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
+
 TEST(DeclPrinter, TestCXXRecordDecl20) {
   ASSERT_TRUE(PrintedDeclCXX98Matches(
   "template  class Inner;"
@@ -1431,8 +1435,8 @@ TEST(DeclPrinter, TestCXXRecordDecl20) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = false; }));
 }
 
 TEST(DeclPrinter, TestCXXRecordDecl21) {
@@ -1451,8 +1455,8 @@ TEST(DeclPrinter, TestCXXRecordDecl21) {
   "};"
   "Outer, 5>::NestedStruct nestedInstance(100);",
   "nestedInstance",
-  "Outer, 5>::NestedStruct nestedInstance(100)"));
-  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; };
+  "Outer, 5>::NestedStruct nestedInstance(100)",
+  [](PrintingPolicy ) { Policy.SuppressTagKeyword = true; }));
 }
 
 TEST(DeclPrinter, TestFunctionParamUglified) {

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits