[libcxx-commits] [libcxx] [lldb] [lldb][libc++] Hide all libc++ implementation details from stacktraces (PR #108870)
Michael Buch via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 24 00:51:48 PDT 2024
================
@@ -90,9 +79,26 @@ class LibCXXFrameRecognizer : public StackFrameRecognizer {
if (!sc.function)
return {};
+ // Check if we have a regex match
+ bool matches_regex = false;
for (RegularExpression &r : m_hidden_regex)
- if (r.Execute(sc.function->GetNameNoArguments()))
+ if (r.Execute(sc.function->GetNameNoArguments())) {
+ matches_regex = true;
+ break;
+ }
+
+ if (matches_regex) {
----------------
Michael137 wrote:
Personally I prefer not having that extra `matches_regex` variable. The first time I was reading through it I was trying to figure out if there was more to this loop that I was missing. So if you don't mind changing it to:
```
for (RegularExpression &r : m_hidden_regex) {
if (!r.Execute(sc.function->GetNameNoArguments()))
continue;
// remaining checks
}
```
that would be appreciated
https://github.com/llvm/llvm-project/pull/108870
More information about the libcxx-commits
mailing list