1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
From b3add805d98e01488d71cbad51206f3a4949bb1c Mon Sep 17 00:00:00 2001
From: Denis Nikitin <denik@chromium.org>
Date: Wed, 5 Feb 2020 18:43:38 +0000
Subject: [PATCH 3/6] Revert "common-mk: Suppress -Wrange-loop-analysis
warning"
This reverts commit 09298dce8d31b5744a83784d027a3fd1e312eb6d.
Reason for revert: <The warning is fixed in the upstream starting from r382025>
Original change's description:
> common-mk: Suppress -Wrange-loop-analysis warning
>
> Disable range-loop-analysis warning in platform2 to unblock llvm-next
> builds failing with the following warning in libbrillo which can't be
> easily fixed:
>
> data_serialization.h:471:20: error: loop variable 'element' is always a
> copy because the range of type 'const std::vector<bool, allocator<bool>
> >' does not return a reference [-Werror,-Wrange-loop-analysis]
> for (const auto& element : value) {
> ^
> use non-reference type
> 'std::__1::__bit_const_reference<std::__1::vector<bool,
> std::__1::allocator<bool> > >'
>
> BUG=chromium:1042979
> TEST=emerge-kevin libbrillo
>
> Change-Id: If5b70cb1a836df325d3683217be4c841fc7a5516
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2008102
> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
> Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
> Tested-by: Manoj Gupta <manojgupta@chromium.org>
Bug: chromium:1042979
Change-Id: Ib86d9f0d61b703d391f60824d8d2ef47eb60f345
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2039651
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Commit-Queue: Denis Nikitin <denik@chromium.org>
Tested-by: Denis Nikitin <denik@chromium.org>
(cherry picked from commit f53a0117ded343295015e81db68bbe878fae5fac)
---
common-mk/BUILD.gn | 4 ----
1 file changed, 4 deletions(-)
diff --git a/common-mk/BUILD.gn b/common-mk/BUILD.gn
index 7c0601b18..dc02a6979 100644
--- a/common-mk/BUILD.gn
+++ b/common-mk/BUILD.gn
@@ -53,7 +53,6 @@ config("compiler_defaults") {
cflags = [
"-Wall",
"-Wunused",
-
# We use C99 array designators in C++ code. Our compilers support this
# extension since C++ has no equivalent yet (as of C++20).
"-Wno-c99-designator",
@@ -65,9 +64,6 @@ config("compiler_defaults") {
"-fvisibility=internal",
"-Wa,--noexecstack",
"-Wimplicit-fallthrough",
-
- # TODO(crbug.com/1042979): Verify the warning when the issue gets fixed.
- "-Wno-range-loop-analysis",
]
cflags_c = [ "-std=gnu11" ] + external_cppflags + external_cxxflags
cflags_cc = [ "-std=gnu++14" ] + external_cppflags + external_cxxflags
--
2.25.1
|