Richard, could you take a look at this? Especially, I am not entirely sure that this is the right program flow. I now specifically test whether the Expr inside a CXXFunctionalCastExpr (create by a CastOperation) is a CXXConstructExpr and set the parenthesis range accordingly. The benefit of this approach is that it is a very small change and should not have side effects to other structures. Alternatively, we could probably pass the parenthesis range into the CastOperation and directly create the CXXConstructExpr with the correct ParenRange. However, that would be a more complex change which might have other side effects.
On Mon, Jul 9, 2012 at 3:24 PM, Daniel Jasper <[email protected]> wrote: > I have noticed that the CXXConstructExpr is not always created with the > correct parenthesis range. For example: > > struct X { X(int x) {} }; > void f() { > X value(7); // CXXConstructExpr has correct range (5, 12) > X(7); // CXXConstructExpr has incorrect range (3, 5), does not include > ")" > } > > Although I am not 100% sure this is a bug and not a feature, the attached > patch fixes it. Please take a look. > > Cheers, > Daniel > > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
