check-webkit-style mistakenly flags assigning to a dereferenced pointer
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Dec 2013 03:49:53 +0000 (03:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Dec 2013 03:49:53 +0000 (03:49 +0000)
commit36988868687c16d32ff85d26af8dc4a277e009f9
treed1ddd555cd2cde163956ad517eb7ef00a6d3a299
parent03fa62701a9b5b99e05e61ccff7498398abafe12
check-webkit-style mistakenly flags assigning to a dereferenced pointer
https://bugs.webkit.org/show_bug.cgi?id=126041

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-12-19
Reviewed by Ryosuke Niwa.

When checking for lines like "Foo *bar;", check-webkit-style doesn't make
sure that there is a declaration. This patch makes sure that there is a
declaration in order to flag spacing around asterisks.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_pointer_reference_marker_location):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/style/checkers/cpp.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py