aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pass.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-10-04 17:20:40 -0400
committerJason Merrill <jason@redhat.com>2023-10-16 11:11:30 -0400
commit7550130c8620085c4efdde3575190588795f9b61 (patch)
tree0c22ff512ade2bf149cec4e3b6b1663635a64e63 /gcc/tree-pass.h
parenta22eeaca5ce753a0a3c22013ee3ecde04c71c2f4 (diff)
downloadgcc-7550130c8620085c4efdde3575190588795f9b61.zip
gcc-7550130c8620085c4efdde3575190588795f9b61.tar.gz
gcc-7550130c8620085c4efdde3575190588795f9b61.tar.bz2
c++: improve fold-expr location
I want to distinguish between constraint && and fold-expressions there of written by the user and those implied by template parameter type-constraints; to that end, let's improve our EXPR_LOCATION for an explicit fold-expression. The fold3.C change is needed because this moves the caret from the end of the expression to the operator, which means the location of the error refers to the macro invocation rather than the macro definition; both locations are still printed, but which one is an error and which a note changes. gcc/cp/ChangeLog: * parser.cc (cp_parser_fold_expression): Track location range. * semantics.cc (finish_unary_fold_expr) (finish_left_unary_fold_expr, finish_right_unary_fold_expr) (finish_binary_fold_expr): Add location parm. * constraint.cc (finish_shorthand_constraint): Pass it. * pt.cc (convert_generic_types_to_packs): Likewise. * cp-tree.h: Adjust. gcc/testsuite/ChangeLog: * g++.dg/concepts/diagnostic3.C: Add expected column. * g++.dg/cpp1z/fold3.C: Adjust diagnostic lines.
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions