clang-tidy:test suppress self-move warning

This test intentionally performs a self-move assignment to observe
how the FileDescriptor class handles such cases. While this is
undefined behavior in C++, the warning is suppressed locally using
Clang diagnostic pragmas to allow the test to compile and run.

Change-Id: I4213d23fcb41afc5d4af9c5f1b2b36f9ffb06d7c
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/test/temporary_file_tests.cpp b/test/temporary_file_tests.cpp
index 9eafa56..5f2bb29 100644
--- a/test/temporary_file_tests.cpp
+++ b/test/temporary_file_tests.cpp
@@ -149,8 +149,17 @@
         // Save path to temporary file
         fs::path path = file.getPath();
 
+// This is undefined behavior in C++, butsuppress the warning
+// to observe how the class handles it
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wself-move"
+#endif
         // Try to move object into itself; should do nothing
         file = static_cast<TemporaryFile&&>(file);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
 
         // Verify object still owns same temporary file and file exists
         EXPECT_EQ(file.getPath(), path);