aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2024-03-26 23:24:02 -0700
committerAlina Sbirlea <asbirlea@google.com>2024-03-26 23:24:02 -0700
commit577e0ef94fb0b4ba9f97a6f58a1961f7ba247d21 (patch)
tree543e8b23d5b2cf5aa204c64ba718f0efab67c996
parent05a7b22a0132bebe99aabee591d3acc99d793ae1 (diff)
downloadllvm-577e0ef94fb0b4ba9f97a6f58a1961f7ba247d21.zip
llvm-577e0ef94fb0b4ba9f97a6f58a1961f7ba247d21.tar.gz
llvm-577e0ef94fb0b4ba9f97a6f58a1961f7ba247d21.tar.bz2
[clang][AST] Silence unused-value warnings in unittest DeclPrinterTest
-rw-r--r--clang/unittests/AST/DeclPrinterTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp
index 07fa02b..8a29d05 100644
--- a/clang/unittests/AST/DeclPrinterTest.cpp
+++ b/clang/unittests/AST/DeclPrinterTest.cpp
@@ -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) {
@@ -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) {
@@ -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(
@@ -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) {
@@ -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) {