<div dir="ltr">On Fri, Jul 5, 2013 at 12:45 AM, Enea Zaffanella <span dir="ltr"><<a href="mailto:zaffanella@cs.unipr.it" target="_blank">zaffanella@cs.unipr.it</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Please find attached a patch (including testcase) for fixing the computation of source ranges for a couple of AST nodes.<br>
<br>
Prior to C++11, CXXFunctionalCastExpr and CXXUnresolvedConstructExpr nodes were assuming a valid RParenLoc; after C++11, the parentheses are no longer mandatory, as in the following examples:<br>
<br>
int foo() { return int{}; }<br>
<br>
typedef std::initializer_list<int> IL;<br>
template<class U> IL foo(U x) { return IL{x}; }<br>
<br>
OK to commit?<br><span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>Do you actually need a definition of initializer_list for this test? IIRC, you can get an CXXUnresolvedConstructExpr with any dependent type. I like using unit-tests to check source ranges rather than checking the output of -ast-dump.</div>
<div><br></div><div>Otherwise, LGTM.</div><div><br></div><div>-Eli</div></div></div></div>