diff options
| author | Ziqing Luo <ziqing@udel.edu> | 2023-02-07 13:14:09 -0800 |
|---|---|---|
| committer | Ziqing Luo <ziqing@udel.edu> | 2023-02-07 13:17:44 -0800 |
| commit | a29e67614c3b7018287e5f68c57bba7618aa880e (patch) | |
| tree | 42e6adb5d0bd1f4a2820a0ab3df96db58c4331fc /lldb/test/API/python_api/process/TestProcessAPI.py | |
| parent | 4e3aae1b91c9371fd5f76ac4d64a69083e212c28 (diff) | |
[-Wunsafe-buffer-usage] Generate fix-it for local variable declarations
Use clang fix-its to transform declarations of local variables, which are used for buffer access , to be of std::span type.
We placed a few limitations to keep the solution simple:
- it only transforms local variable declarations (no parameter declaration);
- it only considers single level pointers, i.e., pointers of type T * regardless of whether T is again a pointer;
- it only transforms to std::span types (no std::array, or std::span::iterator, or ...);
- it can only transform a VarDecl that belongs to a DeclStmt whose has a single child.
One of the purposes of keeping this patch simple enough is to first
evaluate if fix-it is an appropriate approach to do the
transformation.
Reviewed by: NoQ, jkorous
Differential revision: https://reviews.llvm.org/D139737
Diffstat (limited to 'lldb/test/API/python_api/process/TestProcessAPI.py')
0 files changed, 0 insertions, 0 deletions
