Skip to content

Commit 79b591c

Browse files
committed
Fix code formatting
1 parent d31e3c5 commit 79b591c

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,22 @@ class LibCXXFrameRecognizer : public StackFrameRecognizer {
8080
return {};
8181

8282
// Check if we have a regex match
83-
bool matches_regex = false;
83+
bool matches_regex = false;
8484
for (RegularExpression &r : m_hidden_regex)
8585
if (r.Execute(sc.function->GetNameNoArguments())) {
86-
matches_regex = true;
87-
break;
86+
matches_regex = true;
87+
break;
8888
}
8989

9090
if (matches_regex) {
9191
// Only hide this frame if the immediate caller is also within libc++.
92-
lldb::StackFrameSP parent_frame = frame_sp->GetThread()->GetStackFrameAtIndex(frame_sp->GetFrameIndex() + 1);
93-
const auto& parent_sc = parent_frame->GetSymbolContext(lldb::eSymbolContextFunction);
94-
if (parent_sc.function->GetNameNoArguments().GetStringRef().starts_with("std::")) {
92+
lldb::StackFrameSP parent_frame =
93+
frame_sp->GetThread()->GetStackFrameAtIndex(
94+
frame_sp->GetFrameIndex() + 1);
95+
const auto &parent_sc =
96+
parent_frame->GetSymbolContext(lldb::eSymbolContextFunction);
97+
if (parent_sc.function->GetNameNoArguments().GetStringRef().starts_with(
98+
"std::")) {
9599
return m_hidden_frame;
96100
}
97101
}

lldb/test/API/lang/cpp/libcxx-internals-recognizer/TestLibcxxInternalsRecognizer.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,28 @@ def test_frame_recognizer(self):
2020
# `std::ranges::sort` is implemented as an object of types `__sort`.
2121
# We never hide the frame of the entry-point into the standard library, even
2222
# if the name starts with `__` which usually indicates an internal function.
23-
"ranges_sort_less(int, int)": ["ranges::__sort::operator()", "test_algorithms"],
23+
"ranges_sort_less(int, int)": [
24+
"ranges::__sort::operator()",
25+
"test_algorithms",
26+
],
2427
# `ranges::views::transform` internally uses `std::invoke`, and that
2528
# call also shows up in the stack trace
26-
"view_transform(int)": ["::invoke", "ranges::transform_view", "test_algorithms"],
29+
"view_transform(int)": [
30+
"::invoke",
31+
"ranges::transform_view",
32+
"test_algorithms",
33+
],
2734
# Various types of `invoke` calls
2835
"consume_number(int)": ["::invoke", "test_invoke"],
2936
"invoke_add(int, int)": ["::invoke", "test_invoke"],
3037
"Callable::member_function(int) const": ["::invoke", "test_invoke"],
3138
"Callable::operator()(int) const": ["::invoke", "test_invoke"],
3239
# Containers
33-
"MyKey::operator<(MyKey const&) const": ["less", "::emplace", "test_containers"],
40+
"MyKey::operator<(MyKey const&) const": [
41+
"less",
42+
"::emplace",
43+
"test_containers",
44+
],
3445
}
3546
stop_set = set()
3647
while process.GetState() != lldb.eStateExited:

0 commit comments

Comments
 (0)