diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2024-06-28 14:15:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 14:15:09 +0100 |
commit | 46e848a23b212204b01abdc898a53b553d9a57c0 (patch) | |
tree | c65f87f85d495625c9dc69336bbbb8ede9bc2a92 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | 0606c64da8b73768aded766b11e37fd77365e39d (diff) | |
download | llvm-46e848a23b212204b01abdc898a53b553d9a57c0.zip llvm-46e848a23b212204b01abdc898a53b553d9a57c0.tar.gz llvm-46e848a23b212204b01abdc898a53b553d9a57c0.tar.bz2 |
[lldb][test] Add test-cases for packed/aligned structures (#96932)
Adds test that checks whether LLDB correctly infers the
alignment of packed structures. Specifically, the
`InferAlignment` code-path of the `ItaniumRecordLayoutBuilder`
where it assumes that overlapping field offsets imply a
packed structure and thus sets alignment to `1`. See discussion
in https://github.com/llvm/llvm-project/pull/93809.
While here, also added a test-case where we check alignment of
a class whose base has an explicit `DW_AT_alignment
(those don't get transitively propagated in DWARF, but don't seem
like a problem for LLDB).
Lastly, also added an XFAIL-ed tests where the aforementioned
`InferAlignment` kicks in for overlapping fields (but in this
case incorrectly since the structure isn't actually packed).
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions