diff options
| author | Ziqing Luo <ziqing@udel.edu> | 2024-06-13 22:44:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-13 22:44:24 -0700 |
| commit | 2e7b95e4c080426e5085c38cec01176b56798534 (patch) | |
| tree | a5c2454c94a63a190830bb6278c26579e2890e77 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 53dbc1f9f142c635e34b7fed3018f1954d0b573a (diff) | |
[Safe Buffers] Serialize unsafe_buffer_usage pragmas (#92031)
The commit adds serialization and de-serialization implementations for
the stored regions. Basically, the serialized representation of the
regions of a PP is a (ordered) sequence of source location encodings.
For de-serialization, regions from loaded files are stored by their ASTs.
When later one queries if a loaded location L is in an opt-out
region, PP looks up the regions of the loaded AST where L is at.
(Background if helps: a pair of `#pragma clang unsafe_buffer_usage begin/end` pragmas marks a
warning-opt-out region. The begin and end locations (opt-out regions)
are stored in preprocessor instances (PP) and will be queried by the
`-Wunsafe-buffer-usage` analyzer.)
The reported issue at upstream: https://github.com/llvm/llvm-project/issues/90501
rdar://124035402
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
