Index: Tools/Scripts/webkitpy/style/checkers/cpp.py |
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py |
index b039a71d1dbec3474b14961deb584828eda2a23b..fa274783d35f83943d4acb1f12217212d373f8b5 100644 |
--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py |
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py |
@@ -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)): |