Skip to content

Commit

Permalink
[clang][AST] Silence unused-value warnings in unittest DeclPrinterTest
Browse files Browse the repository at this point in the history
  • Loading branch information
alinas committed Mar 27, 2024
1 parent 05a7b22 commit 577e0ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clang/unittests/AST/DeclPrinterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ TEST(DeclPrinter, TestCXXRecordDecl17) {
"struct X {};"
"Z<X> A;",
"A", "Z<X> A"));
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
}

TEST(DeclPrinter, TestCXXRecordDecl18) {
Expand All @@ -1402,7 +1402,7 @@ TEST(DeclPrinter, TestCXXRecordDecl18) {
"struct Y{};"
"Y<Z<X>, 2> B;",
"B", "Y<Z<X>, 2> B"));
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
}

TEST(DeclPrinter, TestCXXRecordDecl19) {
Expand All @@ -1413,7 +1413,7 @@ TEST(DeclPrinter, TestCXXRecordDecl19) {
"struct Y{};"
"Y<Z<X>, 2> B;",
"B", "Y<Z<X>, 2> B"));
[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
}
TEST(DeclPrinter, TestCXXRecordDecl20) {
ASSERT_TRUE(PrintedDeclCXX98Matches(
Expand All @@ -1432,7 +1432,7 @@ 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; };
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; };
}

TEST(DeclPrinter, TestCXXRecordDecl21) {
Expand All @@ -1452,7 +1452,7 @@ 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; };
(void)[](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = true; };
}

TEST(DeclPrinter, TestFunctionParamUglified) {
Expand Down

1 comment on commit 577e0ef

@zahiraam
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alinas has the issue been fixed?

Please sign in to comment.