<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im"><div>Even suggesting nullptr in C++11? With things like the bool warning, NULL* used in non-pointer contexts, etc already, this seems like a fairly logical continuation/generalization of that - or would you say that, even in C++11, that it's clear that false is probably not intended as a pointer literal but still likely that someone should use 0/NULL/etc rather than nullptr?</div>
</div></div></blockquote><div><br></div><div>I suppose the difference (moreso in C++98) is between detecting places where the user was probably way off (false initing pointers, arithmetic comparison with NULL, etc) & a legitimate (if questionable) matter of style. <br>
<br>Recommending nullptr in C++11 seems, to me, to tip towards less a matter of style - even if other null pointers aren't explicitly deprecated, it's pretty close to that kind of situation.</div><div><br></div><div>
I'd have to look through more warnings (clangs & gccs) to see if I could understand/discern some generality about which things should be warnings & which things shouldn't (hard to tell the latter whether they've been omitted by design or just not done yet). Though it'd be nice to build a more general auto-styling tool for things that are clearly outside clang's scope.<br>
<br>[I wonder how easy it would be to implement line length limits & break in sensible places... seems to be the one LLVM developers most often violate. Then naming conventions (casing), NULL/0 usage (& null-testing expressions, as someone else brought up recently), braced single-statement blocks, early returns, etc... ]</div>
<div><br></div><div>- David</div></div>