This is needed for bug 49394 (which examines declarations).
Created attachment 76955 [details] Patch
Comment on attachment 76955 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=76955&action=review Looks good, putting some nitpicks on test. Please feel free to ignore some of (or even all of) them if they don't make sense. > Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:240 > + if not function_information: I'd add a trivial test case which passes this case. Not sure, but "if (foobar) { something... }" or "for (foobar;...) { ... }" would be good candidates? > Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:2818 > + self.assert_pass_ptr_check( s/pass_ptr/pass_ref_ptr/ ? > Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:2823 > + self.assert_pass_ptr_check( s/pass_ptr/pass_ref_ptr/ ? > Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:2837 > + ' PassRefPtr<Type1> m_other;\n' I guess RefPtr would be more realistic?
(In reply to comment #2) > (From update of attachment 76955 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=76955&action=review > > Looks good, putting some nitpicks on test. Please feel free to ignore some of (or even all of) them if they don't make sense. > > > Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:240 > > + if not function_information: > > I'd add a trivial test case which passes this case. Not sure, but "if (foobar) { something... }" or "for (foobar;...) { ... }" would be good candidates? Done. > > Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:2818 > > + self.assert_pass_ptr_check( > > s/pass_ptr/pass_ref_ptr/ ? I left this as is because the test is about Pass*Ptr. (It checks Pass.*Ptr so that it catches PassRefPtr and PassOwnPtr. Other things named the same way should follow the same rule.) > > Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:2837 > > + ' PassRefPtr<Type1> m_other;\n' > > I guess RefPtr would be more realistic? Done. (Good point :).)
Committed as http://trac.webkit.org/changeset/74356