[libc] Fix modular printf attributes (#194003)
This fixes the validation error related to modular printf missing format attribute in C++ code by moving the validation after the implicit format attribute is added for builtins and known library functions.
This also adds a simple C++ test since the C code did compile successfully because the implicit attributes were added in time for the validation happening for C code.
Assisted-by: codex, reviewed and cross checked, also tested with ATfE,
by me. Modular printf reduced code size from ~37K to ~13K for int-only
printf sample.
GitOrigin-RevId: 5b168934d72d4f7ce6177c86bfea0961a0ccc4eb
1 file changed