[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

Ziqing Luo via cfe-commits cfe-commits at lists.llvm.org
Fri May 31 16:42:05 PDT 2024


ziqingluo-90 wrote:

Just realized how stupid I am (O_o)---the current implementation only compares source locations with opt-out regions that are in the same source file, for all source locations from loaded files.   This is not going to work for cases like below.
```
// in a pch header:
#pragma clang unsafe_buffer_usage begin
#include "other_header.h"  // -Wunsafe-buffer-usage in "other_header.h" is NOT suppressed !
#pragma clang unsafe_buffer_usage end
```

Add [WIP] back to this PR.  More work is needed.

https://github.com/llvm/llvm-project/pull/92031


More information about the cfe-commits mailing list