Skip to content
Unverified Commit 56c3b8e9 authored by Takuya Shimizu's avatar Takuya Shimizu Committed by GitHub
Browse files

[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
parent ff7e8540
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment