While I hope someone eventually comes up w/ better wording, I think this is an improvement. LGTM.<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 6:56 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Aug 17, 2012 at 12:10 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>
>> +namespace references {<br>
>> + int &a = a; // expected-warning{{variable 'a' is uninitialized when<br>
>> used within its own initialization}}<br>
><br>
> While completely correct (we are initializing the reference to an<br>
> uninitialized reference), I wonder if this will confuse people into thinking<br>
> there is some kind of copy or uninitialized *value* underlying the<br>
> reference... Is there a better / more clear / more specific warning text we<br>
> can use here?<br>
><br>
> "reference 'a' not yet been bound to a value when used within its own<br>
> initialization"?<br>
> "reference 'a' is unbound when used within its own initialization"?<br>
<br>
</div>I like your first suggestion and think it does make the warning<br>
clearer. It annoys me slightly that we'd have to special-case<br>
references when we output the diagnostic (it would look like in the<br>
attached patch), but maybe that's not a big deal.<br>
<br>
Thanks,<br>
Hans<br>
</blockquote></div><br></div>