Commit 2416c217 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

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/1326500Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#606535}
parent 95c8ebc6
...@@ -25,7 +25,6 @@ struct Property; ...@@ -25,7 +25,6 @@ struct Property;
%omit-struct-type %omit-struct-type
%language=C++ %language=C++
%readonly-tables %readonly-tables
%global-table
%compare-strncmp %compare-strncmp
%define class-name {{class_name}}Hash %define class-name {{class_name}}Hash
%define lookup-function-name findPropertyImpl %define lookup-function-name findPropertyImpl
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment