Set the correct end for the CastOperation.OpRange in CXXFunctionalCastExpr.
Now it is the closing bracket's location instead of the parameter's location.
This can lead to better highlight in the diagnostics.
Similar to https://github.com/llvm/llvm-project/pull/66853
Before:
warning: cast from 'long (*)(const int &)' to 'decltype(fun_ptr)' (aka 'long (*)(int &)') converts to incompatible function type [-Wcast-function-type-strict]
24 | return decltype(fun_ptr)( f_ptr /*comment*/);
| ^~~~~~~~~~~~~~~~~~~~~~~~
After:
warning: cast from 'long (*)(const int &)' to 'decltype(fun_ptr)' (aka 'long (*)(int &)') converts to incompatible function type [-Wcast-function-type-strict]
24 | return decltype(fun_ptr)( f_ptr /*comment*/);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed By: AaronBallman, tbaederr
GitHub PR: https://github.com/llvm/llvm-project/pull/69480