[clang][Sema] Make format size estimator aware of %p's existence in format string (#65969)
This change introduces `-Wformat-overflow` and `-Wformat-truncation` warning flags that were formerly diagnosed from `-Wfortify-source` warning group. This also introduces `-Wformat-overflow-non-kprintf` and `-Wformat-truncation-non-kprintf`, both of which will be used when the format string contains `%p` format string. The rationale for this is that Linux kernel has its own extension for `%p` format specifier, and we need some way to suppress false positives in kernel codebase. The approach of this patch aims NOT to affect non-kernel codebases. Note that GCC stops format size estimation upon `%p` format specifier. As requested in https://github.com/llvm/llvm-project/issues/64871
Loading
Please sign in to comment