patch: construct correct range when recovering member access as call

Nick Lewycky nlewycky at google.com
Wed Aug 21 00:05:06 PDT 2013


The attached patch adjusts the RParenLoc (end loc) used in the
CXXMemberCallExpr that gets created in the recovery path when we see a
non-call member access to a member function. (Ie., "foo->method" missing
parenthesis). This is important to get right, or else the text diagnostic
printer can assert.

The bug is that it places the end sourcelocation at the end of the token
(reusing the place where it wrote the fixit for inserting the "()") ,
instead of the beginning of the last token.

Fixes pr16676. Please review!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130821/89ae957c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr16676-1.patch
Type: application/octet-stream
Size: 1305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130821/89ae957c/attachment.obj>


More information about the cfe-commits mailing list