commit | 2416c217b3ef1c103fc9a078fa06e518c93a631d | [log] [tgz] |
---|---|---|
author | Daniel Bratell <bratell@opera.com> | Thu Nov 08 18:06:07 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Nov 08 18:06:07 2018 |
tree | e65fbfd9513a8901f0f9248c4da99ba86f589563 | |
parent | 95c8ebc6e5b760aa85692b012f448c4fa10d53d6 [diff] |
Avoid shadowing problems with TOTAL_KEYWORDS and others gperf can generate symbols directly into the global namespace (in this case wrapped in "blink") or into more tight scopes. Most of the code generates into a tight scope but not css_property_names.cc. In a new clang a shadowing warning appeared in jumbo builds because of it. There seems to be no downside to using a reduced scope. In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152: ./gen/third_party/blink/renderer/core/css_value_keywords.cc:3612:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow] TOTAL_KEYWORDS = 842, ^ ./gen/third_party/blink/renderer/core/css_property_names.cc:55:5: note: previous declaration is here TOTAL_KEYWORDS = 554, ^ In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152: ./gen/third_party/blink/renderer/core/css_value_keywords.cc:3613:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow] MIN_WORD_LENGTH = 1, ^ ./gen/third_party/blink/renderer/core/css_property_names.cc:56:5: note: previous declaration is here MIN_WORD_LENGTH = 1, ^ In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152: ./gen/third_party/blink/renderer/core/css_value_keywords.cc:3614:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow] MAX_WORD_LENGTH = 42, ^ ./gen/third_party/blink/renderer/core/css_property_names.cc:57:5: note: previous declaration is here MAX_WORD_LENGTH = 34, ^ In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152: ./gen/third_party/blink/renderer/core/css_value_keywords.cc:3615:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow] MIN_HASH_VALUE = 18, ^ ./gen/third_party/blink/renderer/core/css_property_names.cc:58:5: note: previous declaration is here MIN_HASH_VALUE = 9, ^ In file included from gen/third_party/blink/renderer/core/core_generated_jumbo_1.cc:152: ./gen/third_party/blink/renderer/core/css_value_keywords.cc:3616:7: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow] MAX_HASH_VALUE = 6641 ^ ./gen/third_party/blink/renderer/core/css_property_names.cc:59:5: note: previous declaration is here MAX_HASH_VALUE = 3587 ^ 5 errors generated. Change-Id: I03ffd31e0b6731b2e8bacb1e7222be5defce3ea4 Reviewed-on: https://chromium-review.googlesource.com/c/1326500 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Daniel Bratell <bratell@opera.com> Cr-Commit-Position: refs/heads/master@{#606535}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .