Author: Michael Buch Date: 2026-02-05T11:39:34Z New Revision: ed4df0a11a9967b5ad2c99268838a56d482c7527
URL: https://github.com/llvm/llvm-project/commit/ed4df0a11a9967b5ad2c99268838a56d482c7527 DIFF: https://github.com/llvm/llvm-project/commit/ed4df0a11a9967b5ad2c99268838a56d482c7527.diff LOG: [lldb][ClangUserExpression][NFC] Move diagnostic fixup into helper function Will help once we do more diagnostic fixups. Added: Modified: lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp index fb16a6bd0ad1d..239280c652556 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp @@ -948,7 +948,7 @@ lldb::ExpressionVariableSP ClangUserExpression::GetResultAfterDematerialization( return m_result_delegate.GetVariable(); } -void ClangUserExpression::FixupParseErrorDiagnostics( +void ClangUserExpression::FixupCVRParseErrorDiagnostics( DiagnosticManager &diagnostic_manager) const { const bool is_fixable_cvr_error = llvm::any_of( diagnostic_manager.Diagnostics(), @@ -988,6 +988,11 @@ void ClangUserExpression::FixupParseErrorDiagnostics( !m_fixed_text.empty() ? m_fixed_text.c_str() : m_expr_text.c_str()); } +void ClangUserExpression::FixupParseErrorDiagnostics( + DiagnosticManager &diagnostic_manager) const { + FixupCVRParseErrorDiagnostics(diagnostic_manager); +} + char ClangUserExpression::ClangUserExpressionHelper::ID; void ClangUserExpression::ClangUserExpressionHelper::ResetDeclMap( diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h index 5b5687320d3d7..fd24893b1ecdd 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h @@ -212,6 +212,9 @@ class ClangUserExpression : public LLVMUserExpression { lldb::addr_t GetCppObjectPointer(lldb::StackFrameSP frame, llvm::StringRef object_name, Status &err); + void + FixupCVRParseErrorDiagnostics(DiagnosticManager &diagnostic_manager) const; + /// Defines how the current expression should be wrapped. ClangExpressionSourceCode::WrapKind GetWrapKind() const; bool SetupPersistentState(DiagnosticManager &diagnostic_manager, _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
