https://bugs.webkit.org/show_bug.cgi?id=76650
Reviewed by Darin Adler.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_operator_methods):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105652
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-23 Emil A Eklund <eae@chromium.org>
+
+ check-webkit-style whitespace/operators triggers on overloaded division operator
+ https://bugs.webkit.org/show_bug.cgi?id=76650
+
+ Reviewed by Darin Adler.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_spacing):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (CppStyleTest.test_operator_methods):
+
2012-01-23 Ryosuke Niwa <rniwa@webkit.org>
run-perf-tests should report server-side errors
line = clean_lines.elided[line_number] # get rid of comments and strings
# Don't try to do spacing checks for operator methods
- line = sub(r'operator(==|!=|<|<<|<=|>=|>>|>|\+=|-=|\*=|/=|%=|&=|\|=|^=|<<=|>>=)\(', 'operator\(', line)
+ line = sub(r'operator(==|!=|<|<<|<=|>=|>>|>|\+=|-=|\*=|/=|%=|&=|\|=|^=|<<=|>>=|/)\(', 'operator\(', line)
# Don't try to do spacing checks for #include or #import statements at
# minimum because it messes up checks for spacing around /
if match(r'\s*#\s*(?:include|import)', line):
def test_operator_methods(self):
self.assert_lint('String operator+(const String&, const String&);', '')
+ self.assert_lint('String operator/(const String&, const String&);', '')
self.assert_lint('bool operator==(const String&, const String&);', '')
self.assert_lint('String& operator-=(const String&, const String&);', '')
self.assert_lint('String& operator+=(const String&, const String&);', '')