diff options
author | Dan Liew <dan@su-root.co.uk> | 2024-07-19 13:06:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-19 13:06:26 +0100 |
commit | 176bf50cd244505e38f8838a55568060dd3913e8 (patch) | |
tree | f278e9eeae1d2ef00bb4e8db646ad3c57c8c3b4c /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 123c036bd361de9ed6baa0090e5942105764e8db (diff) | |
download | llvm-176bf50cd244505e38f8838a55568060dd3913e8.zip llvm-176bf50cd244505e38f8838a55568060dd3913e8.tar.gz llvm-176bf50cd244505e38f8838a55568060dd3913e8.tar.bz2 |
[clang][NFC] Move Bounds Safety Sema code to `SemaBoundsSafety.cpp` (#99330)
This patch adds a new `SemaBoundsSafety.cpp` source file and moves the
existing `CheckCountedByAttrOnField` function and related helper
functions and types from `SemaDeclAttr.cpp` into the new source file.
The `CheckCountedByAttrOnField` function is now a method on the Sema
class and now has doxygen comments.
The goal behind this refactor is to clearly separate the
`-fbounds-safety` Sema code from everything else.
Although `counted_by(_or_null)` and `sized_by(_or_null)` attributes have
a meaning outside of `-fbounds-safety` it seems reasonable to also have
the Sema logic live in `SemaBoundsSafety.cpp` since the intention is
that the attributes will have the same semantics (but not necessarily
the same enforcement).
As `-fbounds-safety` is upstreamed additional Sema checks will be added
to `SemaBoundsSafety.cpp`.
rdar://131777237
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions