On Fri, Jul 5, 2013 at 12:45 AM, Enea Zaffanella <[email protected]>wrote:

> Please find attached a patch (including testcase) for fixing the
> computation of source ranges for a couple of AST nodes.
>
> 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:
>
>   int foo() { return int{}; }
>
>   typedef std::initializer_list<int> IL;
>   template<class U> IL foo(U x) { return IL{x}; }
>
> OK to commit?
>
>
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.

Otherwise, LGTM.

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to