Commit 4fa3cc35 authored by dcheng@chromium.org's avatar dcheng@chromium.org

Remove a few residual references to the old OVERRIDE and FINAL macros.

BUG=417463

Review URL: https://codereview.chromium.org/648223003

git-svn-id: svn://svn.chromium.org/blink/trunk@183630 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 16fba831
......@@ -55,7 +55,6 @@
#define WTF_COMPILER_SUPPORTS_BLOCKS __has_feature(blocks)
#define WTF_COMPILER_SUPPORTS_C_STATIC_ASSERT __has_extension(c_static_assert)
#define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT __has_extension(cxx_static_assert)
#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL __has_extension(cxx_override_control)
#define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_extension(has_trivial_destructor)
#define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_extension(cxx_strong_enums)
......@@ -73,8 +72,6 @@
#if COMPILER(CLANG)
/* Keep strong enums turned off when building with clang-cl: We cannot yet build all of Blink without fallback to cl.exe, and strong enums are exposed at ABI boundaries. */
#undef WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS
#else
#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
#endif
#endif
......@@ -111,9 +108,6 @@
/* Strong enums should work from gcc 4.4, but doesn't seem to support some operators */
#define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS 1
#endif
#if GCC_VERSION_AT_LEAST(4, 7, 0)
#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
#endif
#endif /* defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__cplusplus) && __cplusplus >= 201103L) */
#endif /* COMPILER(GCC) */
......
......@@ -2402,12 +2402,12 @@ def check_braces(clean_lines, line_number, error):
# ')', or ') const' and doesn't begin with 'if|for|while|switch|else'.
# We also allow '#' for #endif and '=' for array initialization.
previous_line = get_previous_non_blank_line(clean_lines, line_number)[0]
if ((not search(r'[;:}{)=]\s*$|\)\s*((const|OVERRIDE|override|FINAL|final)\s*)*\s*$', previous_line)
if ((not search(r'[;:}{)=]\s*$|\)\s*((const|override|final)\s*)*\s*$', previous_line)
or search(r'\b(if|for|foreach|while|switch|else)\b', previous_line))
and previous_line.find('#') < 0):
error(line_number, 'whitespace/braces', 4,
'This { should be at the end of the previous line')
elif (search(r'\)\s*(((const|OVERRIDE|override|FINAL|final)\s*)*\s*)?{\s*$', line)
elif (search(r'\)\s*(((const|override|final)\s*)*\s*)?{\s*$', line)
and line.count('(') == line.count(')')
and not search(r'\b(if|for|foreach|while|switch)\b', line)
and not match(r'\s+[A-Z_][A-Z_0-9]+\b', line)):
......
......@@ -1601,18 +1601,9 @@ class CppStyleTest(CppStyleTestBase):
self.assert_multi_line_lint(
'int foo() const {',
'Place brace on its own line for function definitions. [whitespace/braces] [4]')
self.assert_multi_line_lint(
'int foo() const OVERRIDE {',
'Place brace on its own line for function definitions. [whitespace/braces] [4]')
self.assert_multi_line_lint(
'int foo() OVERRIDE {',
'Place brace on its own line for function definitions. [whitespace/braces] [4]')
self.assert_multi_line_lint(
'int foo() override {',
'Place brace on its own line for function definitions. [whitespace/braces] [4]')
self.assert_multi_line_lint(
'int foo() FINAL {',
'Place brace on its own line for function definitions. [whitespace/braces] [4]')
self.assert_multi_line_lint(
'int foo() final {',
'Place brace on its own line for function definitions. [whitespace/braces] [4]')
......@@ -1621,21 +1612,11 @@ class CppStyleTest(CppStyleTestBase):
'{\n'
'}\n',
'')
self.assert_multi_line_lint(
'int foo() OVERRIDE\n'
'{\n'
'}\n',
'')
self.assert_multi_line_lint(
'int foo() override\n'
'{\n'
'}\n',
'')
self.assert_multi_line_lint(
'int foo() FINAL\n'
'{\n'
'}\n',
'')
self.assert_multi_line_lint(
'int foo() final\n'
'{\n'
......
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