lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 0dda3f5 2/8: Disable clang -Wself-assign-over


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0dda3f5 2/8: Disable clang -Wself-assign-overloaded warning in date test
Date: Mon, 8 Mar 2021 11:19:46 -0500 (EST)

branch: master
commit 0dda3f5284b3936d598eb0c2222cbc1fe9f80ff5
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Disable clang -Wself-assign-overloaded warning in date test
    
    This warning is expected here as the test checks for self-assignment
    being handled correctly, and needs to be suppressed to allow the build
    to pass with clang.
---
 calendar_date_test.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/calendar_date_test.cpp b/calendar_date_test.cpp
index 52e35bb..798bfb8 100644
--- a/calendar_date_test.cpp
+++ b/calendar_date_test.cpp
@@ -115,7 +115,14 @@ void CalendarDateTest::TestFundamentals()
     LMI_TEST_EQUAL(gregorian_epoch(), date1);
 
     // Assign from self.
+#if defined __clang__
+#   pragma clang diagnostic push
+#   pragma clang diagnostic ignored "-Wself-assign-overloaded"
+#endif // defined __clang__
     date1 = date1;
+#if defined __clang__
+#   pragma clang diagnostic pop
+#endif // defined __clang__
     LMI_TEST_EQUAL(gregorian_epoch(), date1);
 
     // Assign from jdn_t.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]