On Wed, 2019-07-31 at 15:14 -0400, Jason Merrill wrote: > On 7/24/19 5:24 PM, Paolo Carlini wrote: > > this takes care of the four locations, two warnings and two errors. > > I'm > > also adding the missing complain & tf_warning or tf_error guards, > > I > > don't have a SFINAE testcase failing but since the function takes > > a > > tsubst_flags_t argument I think it's the right thing to do. Tested > > x86_64-linux. > > OK. > > > By the way, shall we add to cp-tree.h, at least temporarily, a: > > > > inline location_t > > cp_expr_loc_or_loc (const_tree t) > > { > > return cp_expr_loc_or_loc (t, input_location); > > } > > > > overload? We could use it in a ton of places. > > I'd call it "cp_expr_loc_or_here". But David removed > EXPR_LOC_OR_HERE a > few years back, so I'd like him to weigh in.
I don't care for "cp_expr_loc_or_loc". By "_or_here" do you mean "or input_location"? Calling it "cp_expr_loc_or_input_location" would spell out what it does, but would be rather long. Dave