[llvm] r225931 - Disable -Wunknown-pragmas in a test so that Clang without -Wself-move will not
Richard Trieu
rtrieu at google.com
Tue Jan 13 17:50:12 PST 2015
Author: rtrieu
Date: Tue Jan 13 19:50:12 2015
New Revision: 225931
URL: http://llvm.org/viewvc/llvm-project?rev=225931&view=rev
Log:
Disable -Wunknown-pragmas in a test so that Clang without -Wself-move will not
complain that the flag doesn't exist.
Modified:
llvm/trunk/unittests/ADT/APIntTest.cpp
Modified: llvm/trunk/unittests/ADT/APIntTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/APIntTest.cpp?rev=225931&r1=225930&r2=225931&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/APIntTest.cpp (original)
+++ llvm/trunk/unittests/ADT/APIntTest.cpp Tue Jan 13 19:50:12 2015
@@ -679,6 +679,9 @@ TEST(APIntTest, nearestLogBase2) {
}
#if defined(__clang__)
+// Disable the pragma warning from versions of Clang without -Wself-move
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunknown-pragmas"
// Disable the warning that triggers on exactly what is being tested.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wself-move"
@@ -701,5 +704,6 @@ TEST(APIntTest, SelfMoveAssignment) {
}
#if defined(__clang__)
#pragma clang diagnostic pop
+#pragma clang diagnostic pop
#endif
}
More information about the llvm-commits
mailing list