<br><br><div class="gmail_quote">On Fri, Aug 26, 2011 at 1:23 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div class="im"><br><div><div>On Aug 26, 2011, at 10:38 AM, Douglas Gregor wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<div><blockquote type="cite"><div class="gmail_quote"><div>It seems like it would be pretty limiting to be entirely agnostic to 'better' ways of doing things until the old way is explicitly deprecated by the standard. </div>
</div></blockquote><div><br></div><div>This is an intentional and desirable limitation. A compiler is not a style checker, nor should it ever be. </div></div></div></span></blockquote><br></div></div><div>I completely agree. Is anyone interested in working on a clang plugin that does style checks? That would be hugely useful for a wide variety of purposes!</div>
</div></blockquote><div><br></div><div>Moderately - I'm just reading <a href="http://code.google.com/p/chromium/wiki/WritingClangPlugins">http://code.google.com/p/chromium/wiki/WritingClangPlugins</a> now (is there a better place to get an overview of clang plugin mechanisms/writing) to get a feel for what clang plugins can do.<br>
<br>But basically you can write something that, when an extra argument is passed to the compiler, it can emit extra warnings/diagnostics/fixits/etc, just as though they were first class citizens of the compiler? (eg: instead of passing "-Wnullptr" I'd pass "-plugin nullptr" (or more generally, a style plugin then with its own arguments about whether it enforced nullptr styling, line length styling, braced/unbraced blocks, etc) or something equivalent?)<br>
<br>- David</div></div>