Skip to content

Commit faea938

Browse files
[lldb] Avoid creating a temporary instance of std::string (NFC) (#142294)
GetExceptionBreakpoint takes StringRef to look for a matching breakpoint, so we don't need to create a temporary instance of std::string on our own.
1 parent 32c7dc0 commit faea938

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/tools/lldb-dap/Handler/SetExceptionBreakpointsRequestHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void SetExceptionBreakpointsRequestHandler::operator()(
7676

7777
for (const auto &value : *filters) {
7878
const auto filter = GetAsString(value);
79-
auto *exc_bp = dap.GetExceptionBreakpoint(std::string(filter));
79+
auto *exc_bp = dap.GetExceptionBreakpoint(filter);
8080
if (exc_bp) {
8181
exc_bp->SetBreakpoint();
8282
unset_filters.erase(std::string(filter));

0 commit comments

Comments
 (0)