[libcxx-commits] [libcxx] [lldb] [lldb][libc++] Hide all libc++ implementation details from stacktraces (PR #108870)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 21 02:41:38 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 65c57066e099fe7f1357485cd6c4fb068bc82323 d31e3c541cab88c1b7589120a6eed88c667e1191 --extensions cpp -- lldb/test/API/lang/cpp/libcxx-internals-recognizer/main.cpp lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
index a3fc876476..2a35182b42 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
@@ -80,18 +80,22 @@ public:
return {};
// Check if we have a regex match
- bool matches_regex = false;
+ bool matches_regex = false;
for (RegularExpression &r : m_hidden_regex)
if (r.Execute(sc.function->GetNameNoArguments())) {
- matches_regex = true;
- break;
+ matches_regex = true;
+ break;
}
if (matches_regex) {
// Only hide this frame if the immediate caller is also within libc++.
- lldb::StackFrameSP parent_frame = frame_sp->GetThread()->GetStackFrameAtIndex(frame_sp->GetFrameIndex() + 1);
- const auto& parent_sc = parent_frame->GetSymbolContext(lldb::eSymbolContextFunction);
- if (parent_sc.function->GetNameNoArguments().GetStringRef().starts_with("std::")) {
+ lldb::StackFrameSP parent_frame =
+ frame_sp->GetThread()->GetStackFrameAtIndex(
+ frame_sp->GetFrameIndex() + 1);
+ const auto &parent_sc =
+ parent_frame->GetSymbolContext(lldb::eSymbolContextFunction);
+ if (parent_sc.function->GetNameNoArguments().GetStringRef().starts_with(
+ "std::")) {
return m_hidden_frame;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/108870
More information about the libcxx-commits
mailing list