check-webkit-style should not warn about use of C++11 “>>” instead of “> >"

https://bugs.webkit.org/show_bug.cgi?id=116474

Patch by Sam Weinig <sam@webkit.org> on 2013-09-30
Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/style/checkers/cpp.py:
* Scripts/webkitpy/style/checkers/cpp_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f7cc7dc6
2013-09-30 Sam Weinig <sam@webkit.org>
check-webkit-style should not warn about use of C++11 “>>” instead of “> >"
https://bugs.webkit.org/show_bug.cgi?id=116474
Reviewed by Ryosuke Niwa.
* Scripts/webkitpy/style/checkers/cpp.py:
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
2013-09-30 Sam Weinig <sam@webkit.org>
Remove support for DOMFileSystem
......
......@@ -1831,10 +1831,10 @@ def check_spacing(file_extension, clean_lines, line_number, error):
# FIXME: It's not ok to have spaces around binary operators like .
# You should always have whitespace around binary operators.
# Alas, we can't test < or > because they're legitimately used sans spaces
# Alas, we can't test <, >, <<, or >> because they're legitimately used sans spaces
# (a->b, vector<int> a). The only time we can tell is a < with no >, and
# only if it's not template params list spilling into the next line.
matched = search(r'[^<>=!\s](==|!=|\+=|-=|\*=|/=|/|\|=|&=|<<=|>>=|<=|>=|\|\||\||&&|>>|<<)[^<>=!\s]', line)
matched = search(r'[^<>=!\s](==|!=|\+=|-=|\*=|/=|/|\|=|&=|<<=|>>=|<=|>=|\|\||\||&&)[^<>=!\s]', line)
if not matched:
# Note that while it seems that the '<[^<]*' term in the following
# regexp could be simplified to '<.*', which would indeed match
......
......@@ -1738,9 +1738,7 @@ class CppStyleTest(CppStyleTestBase):
self.assert_lint('a<Foo*> t <<= &b & &c; // Test', '')
self.assert_lint('a<Foo*> t <<= *b / &c; // Test', '')
self.assert_lint('if (a=b == 1)', 'Missing spaces around = [whitespace/operators] [4]')
self.assert_lint('a = 1<<20', 'Missing spaces around << [whitespace/operators] [3]')
self.assert_lint('if (a = b == 1)', '')
self.assert_lint('a = 1 << 20', '')
self.assert_multi_line_lint('#include <sys/io.h>\n', '')
self.assert_multi_line_lint('#import <foo/bar.h>\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