@@ -4681,12 +4681,14 @@ def note_ovl_candidate_non_deduced_mismatch_qualified : Note<
46814681// Note that we don't treat templates differently for this diagnostic.
46824682def note_ovl_candidate_arity : Note<"candidate "
46834683 "%sub{select_ovl_candidate_kind}0,1,2 not viable: "
4684- "requires%select{ at least| at most|}3 %4 argument%s4, but %5 "
4684+ "requires%select{ at least| at most|}3 %4 "
4685+ "%select{|non-object }6argument%s4, but %5 "
46854686 "%plural{1:was|:were}5 provided">;
46864687
46874688def note_ovl_candidate_arity_one : Note<"candidate "
46884689 "%sub{select_ovl_candidate_kind}0,1,2 not viable: "
46894690 "%select{requires at least|allows at most single|requires single}3 "
4691+ "%select{|non-object }6"
46904692 "argument %4, but %plural{0:no|:%5}5 arguments were provided">;
46914693
46924694def note_ovl_candidate_deleted : Note<
@@ -4869,7 +4871,7 @@ def err_ovl_deleted_object_call : Error<
48694871 "call to deleted function call operator in type %0">;
48704872def note_ovl_surrogate_cand : Note<"conversion candidate of type %0">;
48714873def err_member_call_without_object : Error<
4872- "call to non-static member function without an object argument">;
4874+ "call to %select{ non-static|explicit}0 member function without an object argument">;
48734875
48744876// C++ Address of Overloaded Function
48754877def err_addr_ovl_no_viable : Error<
@@ -7289,21 +7291,43 @@ def note_logical_not_silence_with_parens : Note<
72897291 "add parentheses around left hand side expression to silence this warning">;
72907292
72917293def err_invalid_this_use : Error<
7292- "invalid use of 'this' outside of a non-static member function">;
7294+ "invalid use of 'this' %select{outside of a non-static member function"
7295+ "|in a function with an explicit object parameter}0">;
72937296def err_this_static_member_func : Error<
72947297 "'this' cannot be%select{| implicitly}0 used in a static member function "
72957298 "declaration">;
7296- def err_invalid_member_use_in_static_method : Error<
7297- "invalid use of member %0 in static member function">;
7299+ def err_invalid_member_use_in_method : Error<
7300+ "invalid use of member %0 in %select{static|explicit object}1 member function">;
7301+
72987302def err_invalid_qualified_function_type : Error<
7299- "%select{non-member function|static member function|deduction guide}0 "
7303+ "%select{non-member function|static member function|explicit object member function| deduction guide}0 "
73007304 "%select{of type %2 |}1cannot have '%3' qualifier">;
73017305def err_compound_qualified_function_type : Error<
73027306 "%select{block pointer|pointer|reference}0 to function type %select{%2 |}1"
73037307 "cannot have '%3' qualifier">;
73047308def err_qualified_function_typeid : Error<
73057309 "type operand %0 of 'typeid' cannot have '%1' qualifier">;
73067310
7311+ def err_cxx20_deducing_this : Error<
7312+ "explicit object parameters are incompatible with C++ standards before C++2b">;
7313+ def err_explicit_object_default_arg: Error<
7314+ "the explicit object parameter cannot have a default argument">;
7315+ def err_explicit_object_parameter_pack: Error<
7316+ "the explicit object parameter cannot be a function parameter pack">;
7317+ def err_explicit_object_parameter_must_be_first: Error<
7318+ "an explicit object parameter can only appear as the first parameter "
7319+ "of the %select{function|lambda}0">;
7320+ def err_explicit_object_parameter_nonmember: Error<
7321+ "an explicit object parameter cannot appear in a "
7322+ "%select{static|virtual|non-member}0 %select{function|lambda}1">;
7323+ def err_explicit_object_parameter_constructor: Error<
7324+ "an explicit object parameter cannot appear in a %select{constructor|destructor}0">;
7325+ def err_explicit_object_parameter_mutable: Error<
7326+ "a lambda with an explicit object parameter cannot be mutable">;
7327+ def err_invalid_explicit_object_type_in_lambda: Error<
7328+ "invalid explicit object parameter type %0 in lambda with capture; "
7329+ "the type must be the same as, or derived from, the lambda">;
7330+
73077331def err_ref_qualifier_overload : Error<
73087332 "cannot overload a member function %select{without a ref-qualifier|with "
73097333 "ref-qualifier '&'|with ref-qualifier '&&'}0 with a member function %select{"
@@ -8525,53 +8549,65 @@ def err_call_function_incomplete_return : Error<
85258549def err_call_incomplete_argument : Error<
85268550 "argument type %0 is incomplete">;
85278551def err_typecheck_call_too_few_args : Error<
8528- "too few %select{|||execution configuration }0arguments to "
8552+ "too few %select{|||execution configuration }0"
8553+ "%select{|non-object }3arguments to "
85298554 "%select{function|block|method|kernel function}0 call, "
85308555 "expected %1, have %2">;
85318556def err_typecheck_call_too_few_args_one : Error<
8532- "too few %select{|||execution configuration }0arguments to "
8557+ "too few %select{|||execution configuration }0"
8558+ "%select{|non-object }2arguments to "
85338559 "%select{function|block|method|kernel function}0 call, "
85348560 "single argument %1 was not specified">;
85358561def err_typecheck_call_too_few_args_at_least : Error<
8536- "too few %select{|||execution configuration }0arguments to "
8562+ "too few %select{|||execution configuration }0"
8563+ "%select{|non-object }3arguments to "
85378564 "%select{function|block|method|kernel function}0 call, "
85388565 "expected at least %1, have %2">;
85398566def err_typecheck_call_too_few_args_at_least_one : Error<
8540- "too few %select{|||execution configuration }0arguments to "
8567+ "too few %select{|||execution configuration }0"
8568+ "%select{|non-object }2arguments to "
85418569 "%select{function|block|method|kernel function}0 call, "
85428570 "at least argument %1 must be specified">;
85438571def err_typecheck_call_too_few_args_suggest : Error<
8544- "too few %select{|||execution configuration }0arguments to "
8572+ "too few %select{|||execution configuration }0"
8573+ "%select{|non-object }3arguments to "
85458574 "%select{function|block|method|kernel function}0 call, "
8546- "expected %1, have %2; did you mean %3 ?">;
8575+ "expected %1, have %2; did you mean %4 ?">;
85478576def err_typecheck_call_too_few_args_at_least_suggest : Error<
8548- "too few %select{|||execution configuration }0arguments to "
8577+ "too few %select{|||execution configuration }0"
8578+ "%select{|non-object }3arguments to "
85498579 "%select{function|block|method|kernel function}0 call, "
8550- "expected at least %1, have %2; did you mean %3 ?">;
8580+ "expected at least %1, have %2; did you mean %4 ?">;
85518581def err_typecheck_call_too_many_args : Error<
8552- "too many %select{|||execution configuration }0arguments to "
8582+ "too many %select{|||execution configuration }0"
8583+ "%select{|non-object }3arguments to "
85538584 "%select{function|block|method|kernel function}0 call, "
85548585 "expected %1, have %2">;
85558586def err_typecheck_call_too_many_args_one : Error<
8556- "too many %select{|||execution configuration }0arguments to "
8587+ "too many %select{|||execution configuration }0"
8588+ "%select{|non-object }3arguments to "
85578589 "%select{function|block|method|kernel function}0 call, "
85588590 "expected single argument %1, have %2 arguments">;
85598591def err_typecheck_call_too_many_args_at_most : Error<
8560- "too many %select{|||execution configuration }0arguments to "
8592+ "too many %select{|||execution configuration }0"
8593+ "%select{|non-object }3arguments to "
85618594 "%select{function|block|method|kernel function}0 call, "
85628595 "expected at most %1, have %2">;
85638596def err_typecheck_call_too_many_args_at_most_one : Error<
85648597 "too many %select{|||execution configuration }0arguments to "
85658598 "%select{function|block|method|kernel function}0 call, "
8566- "expected at most single argument %1, have %2 arguments">;
8599+ "expected at most single %select{|non-object }3argument %1, "
8600+ "have %2%select{|non-object}3 arguments">;
85678601def err_typecheck_call_too_many_args_suggest : Error<
8568- "too many %select{|||execution configuration }0arguments to "
8602+ "too many %select{|||execution configuration }0"
8603+ "%select{|non-object }3arguments to "
85698604 "%select{function|block|method|kernel function}0 call, "
8570- "expected %1, have %2; did you mean %3 ?">;
8605+ "expected %1, have %2; did you mean %4 ?">;
85718606def err_typecheck_call_too_many_args_at_most_suggest : Error<
8572- "too many %select{|||execution configuration }0arguments to "
8607+ "too many %select{|||execution configuration }0"
8608+ "%select{|non-object }3arguments to "
85738609 "%select{function|block|method|kernel function}0 call, "
8574- "expected at most %1, have %2; did you mean %3 ?">;
8610+ "expected at most %1, have %2; did you mean %4 ?">;
85758611
85768612def err_arc_typecheck_convert_incompatible_pointer : Error<
85778613 "incompatible pointer types passing retainable parameter of type %0"
@@ -9389,10 +9425,10 @@ def warn_cxx98_compat_explicit_conversion_functions : Warning<
93899425
93909426// C++11 defaulted functions
93919427def err_defaulted_special_member_params : Error<
9392- "an explicitly-defaulted %select{|copy |move }0constructor cannot "
9428+ "an explicitly-defaulted %sub{select_special_member_kind}0 cannot "
93939429 "have default arguments">;
93949430def err_defaulted_special_member_variadic : Error<
9395- "an explicitly-defaulted %select{|copy |move }0constructor cannot "
9431+ "an explicitly-defaulted %sub{select_special_member_kind}0 cannot "
93969432 "be variadic">;
93979433def err_defaulted_special_member_return_type : Error<
93989434 "explicitly-defaulted %select{copy|move}0 assignment operator must "
@@ -9455,7 +9491,7 @@ def err_defaulted_comparison_template : Error<
94559491 "comparison operator template cannot be defaulted">;
94569492def err_defaulted_comparison_num_args : Error<
94579493 "%select{non-member|member}0 %sub{select_defaulted_comparison_kind}1"
9458- " comparison operator must have %select{2|1}0 parameters">;
9494+ " must have %select{2|1}0 parameters">;
94599495def err_defaulted_comparison_param : Error<
94609496 "invalid parameter type for defaulted %sub{select_defaulted_comparison_kind}0"
94619497 "; found %1, expected %2%select{| or %4}3">;
0 commit comments