[clang] Fix buildbot failure. (PR #86741)
Zahira Ammarguellat via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 14:23:56 PDT 2024
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 <zahira.ammarguellat at intel.com>
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<typename T> struct Z {};"
- "struct X {};"
- "Z<X> A;",
- "A", "Z<X> A"));
- [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
+ ASSERT_TRUE(PrintedDeclCXX98Matches(
+ "template<typename T> struct Z {};"
+ "struct X {};"
+ "Z<X> A;",
+ "A", "Z<X> A",
+ [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; }));
}
TEST(DeclPrinter, TestCXXRecordDecl18) {
- ASSERT_TRUE(PrintedDeclCXX98Matches("template<typename T> struct Z {};"
- "struct X {};"
- "Z<X> A;"
- "template <typename T1, int>"
- "struct Y{};"
- "Y<Z<X>, 2> B;",
- "B", "Y<Z<X>, 2> B"));
- [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
+ ASSERT_TRUE(PrintedDeclCXX98Matches(
+ "template<typename T> struct Z {};"
+ "struct X {};"
+ "Z<X> A;"
+ "template <typename T1, int>"
+ "struct Y{};"
+ "Y<Z<X>, 2> B;",
+ "B", "Y<Z<X>, 2> B",
+ [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; }));
}
TEST(DeclPrinter, TestCXXRecordDecl19) {
- ASSERT_TRUE(PrintedDeclCXX98Matches("template<typename T> struct Z {};"
- "struct X {};"
- "Z<X> A;"
- "template <typename T1, int>"
- "struct Y{};"
- "Y<Z<X>, 2> B;",
- "B", "Y<Z<X>, 2> B"));
- [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
+ ASSERT_TRUE(PrintedDeclCXX98Matches(
+ "template<typename T> struct Z {};"
+ "struct X {};"
+ "Z<X> A;"
+ "template <typename T1, int>"
+ "struct Y{};"
+ "Y<Z<X>, 2> B;",
+ "B", "Y<Z<X>, 2> B",
+ [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; }));
}
+
TEST(DeclPrinter, TestCXXRecordDecl20) {
ASSERT_TRUE(PrintedDeclCXX98Matches(
"template <typename T, int N> class Inner;"
@@ -1431,8 +1435,8 @@ TEST(DeclPrinter, TestCXXRecordDecl20) {
"};"
"Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100);",
"nestedInstance",
- "Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100)"));
- [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
+ "Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100)",
+ [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; }));
}
TEST(DeclPrinter, TestCXXRecordDecl21) {
@@ -1451,8 +1455,8 @@ TEST(DeclPrinter, TestCXXRecordDecl21) {
"};"
"Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100);",
"nestedInstance",
- "Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100)"));
- [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
+ "Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100)",
+ [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; }));
}
TEST(DeclPrinter, TestFunctionParamUglified) {
More information about the cfe-commits
mailing list