[libc++][format] Improves compile-time diagnostics.
Then a std-format-spec option is invalid for a type the compile-time validation will detect its usage and issue a diagnostic. Before it validated after parsing the entire std-format-spec, which meant the diagnostic was less precise. It would be possible to do this validation run-time but that has a performance overhead. When using the format family of functions, this would be unneeded overhead; the validation was done at run-time. For the vformat family it would give better diagnostics. To avoid paying what you don't use, it has been decided to aim for the better performance. It's more likely users will use the format family of functions. Depends on D155264 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D155364
Loading
Please sign in to comment