[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 23 10:05:15 PDT 2023
AaronBallman wrote:
It looks like these changes surfaced an existing bug with `GetExprRange()`: https://github.com/llvm/llvm-project/blob/4554eac5d4fd7c7a02f947767fc25bd27f004106/clang/lib/Sema/SemaChecking.cpp#L13734
`getSourceExpr()` can return nullptr:
https://github.com/llvm/llvm-project/blob/4554eac5d4fd7c7a02f947767fc25bd27f004106/clang/include/clang/AST/ASTNodeTraverser.h#L735
https://github.com/llvm/llvm-project/blob/4554eac5d4fd7c7a02f947767fc25bd27f004106/clang/lib/AST/ComputeDependence.cpp#L30
https://github.com/llvm/llvm-project/blob/4554eac5d4fd7c7a02f947767fc25bd27f004106/clang/lib/AST/Expr.cpp#L3919
Note: I did not investigate whether the source expression *should* be null in this case, just verified that it can be and is in this code example.
https://github.com/llvm/llvm-project/pull/69049
More information about the cfe-commits
mailing list