<div dir="ltr"><div>I am the original author of style checker patch reported in previous mail by Gyuyoung.</div><div><br></div><div>My logic for checking the error is simple:</div><div>- In the patch, I check for any line which contains regex static_cast&lt;Foo*&gt;.</div>

<div>- If line does contain it, I pick the regex part Foo and search for Foo.h in the codebase.</div><div>- 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.</div>

<div>- In cases, where Foo.h is not found, I don&#39;t report any error (which I plan to look in future for more refining).</div><div><br></div><div>I have raised the bug <a href="https://bugs.webkit.org/show_bug.cgi?id=122156">https://bugs.webkit.org/show_bug.cgi?id=122156</a> for tracking this change in WebKit and will soon be porting the patch which got committed in blink (<a href="https://src.chromium.org/viewvc/blink?view=rev&amp;revision=158628">https://src.chromium.org/viewvc/blink?view=rev&amp;revision=158628</a>).</div>

<div><br></div><div>Regards,</div><div>Ravi Kasibhatla.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 1, 2013 at 11:22 AM, Gyuyoung Kim <span dir="ltr">&lt;<a href="mailto:gyuyoung.kim@webkit.org" target="_blank">gyuyoung.kim@webkit.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">







<p>My plan is to show style error when submitted patch doesn&#39;t use toFoo() though toFoo exists. This idea was originated from blink commit. However, it was reverted because of some regression.</p>
<p><a href="http://src.chromium.org/viewvc/blink?view=revision&amp;revision=158059" target="_blank">http://src.chromium.org/viewvc/blink?view=revision&amp;revision=158059</a></p><p><br></p><p>If my understanding is correct, the toFoo() style checker checks if there is toFoo() in a class. If uploaded patch uses static_cast&lt;&gt; instead of toFoo() though there is toFoo(), style checker will generate style error.</p>



<p>Anyway, I think I need to investigate the commit and consider the idea further.</p><span class="HOEnZb"><font color="#888888">
<p>Gyuyoung.</p></font></span></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Oct 1, 2013 at 3:20 AM, Ryosuke Niwa <span dir="ltr">&lt;<a href="mailto:rniwa@webkit.org" target="_blank">rniwa@webkit.org</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div>On Mon, Sep 30, 2013 at 10:52 AM, Yong Li <span dir="ltr">&lt;<a href="mailto:yong.li.webkit@outlook.com" target="_blank">yong.li.webkit@outlook.com</a>&gt;</span> wrote:<br>


</div></div><div class="gmail_extra">

<div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div>
<div style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><br>
Bottom line is turning on RTTI in debug build?</div></div></div></blockquote><div><br></div></div><div>Style checker analyzes the code statically.  It&#39;s nothing to do with runtime assertions.  If that wasn&#39;t clear enough, style check happens before WebKit is ever built.</div>




<div><br></div><div>- R. Niwa</div><div><br></div></div></div></div>
<br></div></div><div class="im">_______________________________________________<br>
webkit-dev mailing list<br>
<a href="mailto:webkit-dev@lists.webkit.org" target="_blank">webkit-dev@lists.webkit.org</a><br>
<a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
webkit-dev mailing list<br>
<a href="mailto:webkit-dev@lists.webkit.org">webkit-dev@lists.webkit.org</a><br>
<a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br>
<br></blockquote></div><br></div>