[Lldb-commits] [lldb] [lldb] Remove redundant calls to std::unique_ptr<T>::get (NFC) (PR #139395)
via lldb-commits
lldb-commits at lists.llvm.org
Sat May 10 10:21:01 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/139395.diff
2 Files Affected:
- (modified) lldb/source/API/SBSaveCoreOptions.cpp (+1-1)
- (modified) lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h (+2-2)
``````````diff
diff --git a/lldb/source/API/SBSaveCoreOptions.cpp b/lldb/source/API/SBSaveCoreOptions.cpp
index e101f6a25783c..15584abaac013 100644
--- a/lldb/source/API/SBSaveCoreOptions.cpp
+++ b/lldb/source/API/SBSaveCoreOptions.cpp
@@ -129,5 +129,5 @@ uint64_t SBSaveCoreOptions::GetCurrentSizeInBytes(SBError &error) {
}
lldb_private::SaveCoreOptions &SBSaveCoreOptions::ref() const {
- return *m_opaque_up.get();
+ return *m_opaque_up;
}
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
index d8d519693f102..ea763b94fcc75 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
@@ -344,7 +344,7 @@ class ClangExpressionDeclMap : public ClangASTSource {
/// Activate parser-specific variables
void EnableParserVars() {
- if (!m_parser_vars.get())
+ if (!m_parser_vars)
m_parser_vars = std::make_unique<ParserVars>();
}
@@ -371,7 +371,7 @@ class ClangExpressionDeclMap : public ClangASTSource {
/// Activate struct variables
void EnableStructVars() {
- if (!m_struct_vars.get())
+ if (!m_struct_vars)
m_struct_vars.reset(new struct StructVars);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/139395
More information about the lldb-commits
mailing list