[test] Disable the -Wself-move warning that triggers on exactly what is being tested (NFC)

/Users/jiefu/llvm-project/llvm/unittests/Option/OptionParsingTest.cpp:251:6: error: explicitly moving variable of type 'InputArgList' to itself [-Werror,-Wself-move]
  AL = std::move(AL);
  ~~ ^           ~~
1 error generated.
This commit is contained in:
Jie Fu 2023-08-25 07:40:42 +08:00
parent d2c37fc4f7
commit 4e627a3a9b

View File

@ -238,6 +238,12 @@ TYPED_TEST(OptTableTest, IgnoreCase) {
EXPECT_TRUE(AL.hasArg(OPT_B));
}
#if defined(__clang__)
// Disable the warning that triggers on exactly what is being tested.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wself-move"
#endif
TYPED_TEST(OptTableTest, InputArgListSelfAssign) {
TypeParam T;
unsigned MAI, MAC;
@ -255,6 +261,10 @@ TYPED_TEST(OptTableTest, InputArgListSelfAssign) {
EXPECT_FALSE(AL.hasArg(OPT_SLASH_C));
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
TYPED_TEST(OptTableTest, DoNotIgnoreCase) {
TypeParam T;
unsigned MAI, MAC;