aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h
diff options
context:
space:
mode:
authorShivam Gupta <shivam98.tkg@gmail.com>2024-07-11 12:57:50 +0530
committerGitHub <noreply@github.com>2024-07-11 12:57:50 +0530
commita18f45f556c781d711f82043bf451fcce8324163 (patch)
tree8bdd2d86ac280c5b526d8159bafcd836ab447c7b /lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h
parent6a907699d8b4fb35a843ab8fd84ca56ed93fc201 (diff)
downloadllvm-a18f45f556c781d711f82043bf451fcce8324163.zip
llvm-a18f45f556c781d711f82043bf451fcce8324163.tar.gz
llvm-a18f45f556c781d711f82043bf451fcce8324163.tar.bz2
[lldb] Fix string truncation method when substring is the prefix of string (NFC) (#94785)
Correct the method used to truncate the source_file string when substring is a prefix. The previous method used substr, which was changed to resize for clarity and efficiency. Caught by cppcheck - lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp:290:19: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr] Source code - source_file = source_file.substr(0, pos); Fix #91211 --------- Co-authored-by: Shivam Gupta <shivma98.tkg@gmail.com>
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.h')
0 files changed, 0 insertions, 0 deletions