[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master d126046 5/8: Disable clang -Wbraced-scalar-in
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master d126046 5/8: Disable clang -Wbraced-scalar-init in a test |
Date: |
Mon, 8 Mar 2021 11:19:47 -0500 (EST) |
branch: master
commit d12604620644a9d5891183d6b3044bc9083cca8d
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Disable clang -Wbraced-scalar-init in a test
This warning is expected here, so just disable it locally.
---
ssize_lmi_test.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ssize_lmi_test.cpp b/ssize_lmi_test.cpp
index 241d793..484ec35 100644
--- a/ssize_lmi_test.cpp
+++ b/ssize_lmi_test.cpp
@@ -126,6 +126,11 @@ constexpr char f0c(T(&)[n])
return bourn_cast<char>(n);
}
+#if defined __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wbraced-scalar-init"
+#endif // defined __clang__
+
// deduce int, return char; braced-init-list
template<typename T, int n>
char f0d(T(&)[n])
@@ -147,6 +152,10 @@ char f0f(T(&)[n])
return {n}; // error: narrowing conversion of '128' from 'unsigned int'
}
+#if defined __clang__
+# pragma clang diagnostic pop
+#endif // defined __clang__
+
// deduce auto, return char; braced-init-list
// auto is deduced to int, not to std::size_t
template<typename T, auto n>
- [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 <=
- [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, 2021/03/08
- [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