@@ -360,61 +360,75 @@ ERROR(pound_assert_failure,none,
360
360
NOTE(constexpr_unknown_reason_default,none,
361
361
" cannot evaluate expression as constant here" , ())
362
362
NOTE(constexpr_unevaluable_operation,none,
363
- " cannot constant evaluate operation" , ())
363
+ " cannot constant evaluate operation%select{| used by this call}0 " , (bool ))
364
364
365
365
NOTE(constexpr_too_many_instructions,none,
366
366
" exceeded instruction limit: %0 when evaluating the expression "
367
367
" at compile time" , (unsigned ))
368
- NOTE(constexpr_limit_exceeding_instruction,none, " limit exceeded here" , ())
368
+ NOTE(constexpr_limit_exceeding_instruction,none, " limit exceeded "
369
+ " %select{here|during this call}0" , (bool ))
369
370
370
371
NOTE(constexpr_loop_found_note,none,
371
372
" control-flow loop found during evaluation " , ())
372
- NOTE(constexpr_loop_instruction,none, " found loop here" , ())
373
+ NOTE(constexpr_loop_instruction,none, " found loop "
374
+ " %select{here|inside this call}0" , (bool ))
373
375
374
376
NOTE(constexpr_overflow,none, " integer overflow detected" , ())
375
- NOTE(constexpr_overflow_operation,none, " operation overflows" , ())
377
+ NOTE(constexpr_overflow_operation,none, " operation"
378
+ " %select{| performed during this call}0 overflows" , (bool ))
376
379
377
380
NOTE(constexpr_trap,none, " trap detected" , ())
378
- NOTE(constexpr_trap_operation,none, " operation traps" , ())
381
+ NOTE(constexpr_trap_operation,none, " operation"
382
+ " %select{| performed during this call}0 traps" , (bool ))
383
+
384
+ NOTE(constexpr_assertion_failed, none, " assertion failed with message: %0" ,
385
+ (StringRef))
386
+ NOTE(constexpr_assertion_failed_here, none, " assertion failed"
387
+ " %select{ here| during this call}0 " , (bool ))
379
388
380
389
NOTE(constexpr_invalid_operand_seen, none,
381
390
" operation with invalid operands encountered during evaluation" ,())
382
391
NOTE(constexpr_operand_invalid_here, none,
383
- " operation with invalid operands encountered here" ,())
392
+ " operation with invalid operands encountered "
393
+ " %select{here|during this call}0" , (bool ))
384
394
385
395
NOTE(constexpr_value_unknown_at_top_level,none,
386
396
" cannot evaluate top-level value as constant here" ,())
387
397
NOTE(constexpr_multiple_writers_found_at_top_level,none,
388
398
" top-level value has multiple assignments" ,())
389
399
390
400
NOTE(constexpr_unsupported_instruction_found, none,
391
- " encountered operation not supported by the evaluator" , ())
392
- NOTE(constexpr_unsupported_instruction_found_here,none,
393
- " operation not supported by the evaluator" , ())
401
+ " encountered operation not supported by the evaluator: %0 " , (StringRef ))
402
+ NOTE(constexpr_unsupported_instruction_found_here,none, " operation "
403
+ " %select{| used by this call is}0 not supported by the evaluator" , (bool ))
394
404
395
405
NOTE(constexpr_unknown_function_called, none,
396
- " encountered call to a function whose body is not available" , ())
406
+ " encountered call to '%0' whose body is not available" , (StringRef ))
397
407
NOTE(constexpr_unknown_function_called_here, none,
398
- " call to a function whose body is not available" , ())
408
+ " %select{|calls a }0function whose body is not available" , (bool ))
399
409
400
410
NOTE(constexpr_untracked_sil_value_use_found, none,
401
411
" encountered use of a variable not tracked by the evaluator" , ())
402
412
NOTE(constexpr_untracked_sil_value_used_here, none,
403
- " untracked variable used here" , ())
404
-
405
- NOTE(constexpr_witness_call_with_no_conformance_found, none,
406
- " cannot find concrete conformance for a witness method call" , ())
407
- NOTE(constexpr_witness_call_with_no_target_found, none,
408
- " cannot resolve a witness method call to a concrete function" , ())
409
- NOTE(constexpr_witness_call_found_here, none,
410
- " witness method call found here" , ())
413
+ " untracked variable used %select{here|by this call}0" , (bool ))
414
+
415
+ NOTE(constexpr_unresolvable_witness_call, none,
416
+ " encountered unresolvable witness method call: '%0'" , (StringRef))
417
+ NOTE(constexpr_no_witness_table_entry, none, " cannot find witness table entry "
418
+ " %select{for this call|for a witness-method invoked during this call}0" ,
419
+ (bool ))
420
+ NOTE(constexpr_witness_call_with_no_conformance, none,
421
+ " cannot find concrete conformance "
422
+ " %select{for this call|for a witness-method invoked during this call}0" ,
423
+ (bool ))
411
424
412
425
NOTE(constexpr_unknown_control_flow_due_to_skip,none, " branch depends on "
413
426
" non-constant value produced by an unevaluated instructions" , ())
414
427
NOTE(constexpr_returned_by_unevaluated_instruction,none,
415
428
" return value of an unevaluated instruction is not a constant" , ())
416
429
NOTE(constexpr_mutated_by_unevaluated_instruction,none, " value mutable by an "
417
430
" unevaluated instruction is not a constant" , ())
431
+ ERROR(not_constant_evaluable, none, " not constant evaluable" , ())
418
432
419
433
ERROR(non_physical_addressof,none,
420
434
" addressof only works with purely physical lvalues; "
0 commit comments