Skip to content

Commit 577e0ef

Browse files
committed
[clang][AST] Silence unused-value warnings in unittest DeclPrinterTest
1 parent 05a7b22 commit 577e0ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/unittests/AST/DeclPrinterTest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ TEST(DeclPrinter, TestCXXRecordDecl17) {
13911391
"struct X {};"
13921392
"Z<X> A;",
13931393
"A", "Z<X> A"));
1394-
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
1394+
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
13951395
}
13961396

13971397
TEST(DeclPrinter, TestCXXRecordDecl18) {
@@ -1402,7 +1402,7 @@ TEST(DeclPrinter, TestCXXRecordDecl18) {
14021402
"struct Y{};"
14031403
"Y<Z<X>, 2> B;",
14041404
"B", "Y<Z<X>, 2> B"));
1405-
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
1405+
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
14061406
}
14071407

14081408
TEST(DeclPrinter, TestCXXRecordDecl19) {
@@ -1413,7 +1413,7 @@ TEST(DeclPrinter, TestCXXRecordDecl19) {
14131413
"struct Y{};"
14141414
"Y<Z<X>, 2> B;",
14151415
"B", "Y<Z<X>, 2> B"));
1416-
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
1416+
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
14171417
}
14181418
TEST(DeclPrinter, TestCXXRecordDecl20) {
14191419
ASSERT_TRUE(PrintedDeclCXX98Matches(
@@ -1432,7 +1432,7 @@ TEST(DeclPrinter, TestCXXRecordDecl20) {
14321432
"Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100);",
14331433
"nestedInstance",
14341434
"Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100)"));
1435-
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
1435+
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
14361436
}
14371437

14381438
TEST(DeclPrinter, TestCXXRecordDecl21) {
@@ -1452,7 +1452,7 @@ TEST(DeclPrinter, TestCXXRecordDecl21) {
14521452
"Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100);",
14531453
"nestedInstance",
14541454
"Outer<Inner<int, 10>, 5>::NestedStruct nestedInstance(100)"));
1455-
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
1455+
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
14561456
}
14571457

14581458
TEST(DeclPrinter, TestFunctionParamUglified) {

0 commit comments

Comments
 (0)