aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorjkorous-apple <32549412+jkorous-apple@users.noreply.github.com>2024-02-13 14:31:11 -0800
committerGitHub <noreply@github.com>2024-02-13 14:31:11 -0800
commite06f3522cc55cec60084a1278109ab236ef7a3ee (patch)
tree3256dc638d34656bc8262352810209901c30e49a /lldb/source/Commands/CommandObjectCommands.cpp
parent137bd782959523e8168c346bc8801d0b14f684c5 (diff)
downloadllvm-e06f3522cc55cec60084a1278109ab236ef7a3ee.zip
llvm-e06f3522cc55cec60084a1278109ab236ef7a3ee.tar.gz
llvm-e06f3522cc55cec60084a1278109ab236ef7a3ee.tar.bz2
[-Wunsafe-buffer-usage] Emit fixits for array decayed to pointer (#80347)
Covers cases where DeclRefExpr referring to a const-size array decays to a pointer and is used "as a pointer" (e. g. passed to a pointer type parameter). Since std::array<T, N> doesn't implicitly convert to pointer to its element type T* the cast needs to be done explicitly as part of the fixit when we retrofit std::array to code that previously worked with constant size array. std::array::data() method is used for the explicit cast. In terms of the fixit machine this covers the UPC(DRE) case for Array fixit strategy. The emitted fixit inserts call to std::array::data() method similarly to analogous fixit for Span strategy.
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
0 files changed, 0 insertions, 0 deletions