Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb] Fix string truncation method when substring is the prefix of s…
…tring (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 <[email protected]>
- Loading branch information