On 11/21/18 1:49 PM, Jakub Jelinek wrote:
On Wed, Nov 21, 2018 at 01:29:15PM -0500, Jason Merrill wrote:
similarly for operator"" _F the column is under _ rather than first o.
I disagree with this one: the name of the declaration is operator""_F, so I
think the caret should go at the first o.
Right now when cp_parser_operator_function_id is called, it returns locus like:
operator new
^~~
operator delete []
^~~~~~~~~
operator ==
^
operator "" _foo
UNKNOWN_LOCATION
The last one is because for others we do return cp_expr (id, start_loc);
but for operator "" just return id;
So, do you suggest we should instead return
operator new
^~~~~~~~~~~~
operator delete []
^~~~~~~~~~~~~~~~~~
operator ==
^~~~~~~~~~~
operator "" _foo
^~~~~~~~~~~~~~~~
?
Yes.
That would mean cp_parser_operator_function_id would need to pass
location_t start_loc (the start of the operator token) to cp_parser_operator and
let that create a range in all cases rather than just for operator
new/delete.
Sure.
Jason