[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.
- [lmi-commits] [lmi] master updated (0ec5f1b -> 9cc560d), Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 88f799c 6/8: Avoid using gcc-specific warnings with clang, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master d126046 5/8: Disable clang -Wbraced-scalar-init in a test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 9cc560d 8/8: Fix defect introduced 20210303T1108Z: misalignment, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 71238a3 4/8: Disable clang tautological constant compare warning in a test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 0dda3f5 2/8: Disable clang -Wself-assign-overloaded warning in date test,
Greg Chicares <=
- [lmi-commits] [lmi] master fc767f7 3/8: Include <cmath> to get std::rint() declaration, not <math.h>, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 33a1270 1/8: Remove tests involving std::mem_fun, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master f5d41a0 7/8: Replace raw string literals, Greg Chicares, 2021/03/08