PR c/68757: fix uninitialized src_range for various builtins
gcc/c/ChangeLog: PR c/68757 * c-parser.c (c_parser_get_builtin_args): Add "out_close_paren_loc" param, and write back to it. (c_parser_postfix_expression): Capture the closing parenthesis location for RID_CHOOSE_EXPR, RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX, RID_BUILTIN_SHUFFLE and use it to set the source range for such expressions; within RID_BUILTIN_COMPLEX set the underlying location. gcc/testsuite/ChangeLog: PR c/68757 * gcc.dg/plugin/diagnostic-test-expressions-1.c (test_builtin_choose_expr): New test function. (test_builtin_call_with_static_chain): Likewise. (test_builtin_complex): Likewise. (test_builtin_shuffle): Likewise. From-SVN: r231414
Showing
Please
register
or
sign in
to comment