[clang] [RFC] Initial implementation of P2719 (PR #113510)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 1 22:48:34 PDT 2025
================
@@ -9817,27 +9817,54 @@ def err_operator_new_delete_invalid_result_type : Error<
def err_operator_new_delete_dependent_result_type : Error<
"%0 cannot have a dependent return type; use %1 instead">;
def err_operator_new_delete_too_few_parameters : Error<
- "%0 must have at least one parameter">;
+ "%select{|type aware }0%select{|destroying }1%2 must have at least %select{|one|two|three|four|five}3 parameter%s3">;
def err_operator_new_delete_template_too_few_parameters : Error<
"%0 template must have at least two parameters">;
def warn_operator_new_returns_null : Warning<
"%0 should not return a null pointer unless it is declared 'throw()'"
"%select{| or 'noexcept'}1">, InGroup<OperatorNewReturnsNull>;
def err_operator_new_dependent_param_type : Error<
- "%0 cannot take a dependent type as first parameter; "
- "use size_t (%1) instead">;
+ "%select{|type aware }0%select{|destroying }1%2 cannot take a dependent type as its %select{first|second|third|fourth|fifth}3 parameter; "
----------------
ojhunt wrote:
I understand what is meant by pointing now, and have updated the various diagnostics to include the relevant source ranges
<!-- Reviewable comment -OMp1SyY5pUM4GYh8wnq:b6x2ha6 -->
<!-- Sent from Reviewable.io -->
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list