[Webkit-unassigned] [Bug 122156] [Tools] Add the check for use of static_cast on objects in Style Checker
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 1 05:52:25 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=122156
--- Comment #1 from Ravi Kasibhatla <r.kasibhatla at samsung.com> 2013-10-01 05:51:21 PST ---
I have committed the patch which addresses this change in blink under the CL (https://src.chromium.org/viewvc/blink?view=rev&revision=158628).
My logic for checking the error is simple:
- In the patch, I check for any line which contains regex static_cast<Foo*>.
- If line does contain it, I pick the regex part Foo and search for Foo.h in the codebase.
- In Foo.h, I check for toFoo signature and if it is present, I ask the user to use it. If the signature is not present, I throw the message of adding the toFoo() and using it.
- In cases, where Foo.h is not found, I don't report any error (which I plan to look in future for more refining).
I do need to modify the patch for WebKit to accommodate the use of macros (while checking for presence of toFoo() in the header file) like ELEMENT_TYPE_CASTS and CSS_VALUE_TYPE_CASTS which are used to generate toFoo at compilation times.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list