[Lldb-commits] [lldb] c80f484 - [lldb][NFC] Fix a build failure with MSVC (#111231)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 8 17:46:05 PDT 2024
Author: Igor Kudrin
Date: 2024-10-08T17:46:02-07:00
New Revision: c80f48491b150197d758f0906011b44472fa2dd5
URL: https://github.com/llvm/llvm-project/commit/c80f48491b150197d758f0906011b44472fa2dd5
DIFF: https://github.com/llvm/llvm-project/commit/c80f48491b150197d758f0906011b44472fa2dd5.diff
LOG: [lldb][NFC] Fix a build failure with MSVC (#111231)
This fixes a build error with msvc for code introduced in #106442:
```
...\lldb\source\Expression\DiagnosticManager.cpp(37): error C2668: 'llvm::ErrorInfo<lldb_private::ExpressionError,lldb_private::ExpressionErrorBase>::ErrorInfo': ambiguous call to overloaded function
...\llvm\include\llvm/Support/Error.h(357): note: could be 'llvm::ErrorInfo<lldb_private::ExpressionError,lldb_private::ExpressionErrorBase>::ErrorInfo(std::error_code)', which inherits 'lldb_private::CloneableECError::CloneableECError(std::error_code)' via base class 'lldb_private::ExpressionErrorBase'
...\llvm\include\llvm/Support/Error.h(357): note: or 'llvm::ErrorInfo<lldb_private::ExpressionError,lldb_private::ExpressionErrorBase>::ErrorInfo(std::error_code,std::string)', which inherits 'lldb_private::ExpressionErrorBase::ExpressionErrorBase(std::error_code,std::string)' via base class 'lldb_private::ExpressionErrorBase'
...\lldb\source\Expression\DiagnosticManager.cpp(37): note: while trying to match the argument list '(std::error_code)'
```
Added:
Modified:
lldb/include/lldb/Utility/Status.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Utility/Status.h b/lldb/include/lldb/Utility/Status.h
index 3910c26d115a09..2911ffb804c6fb 100644
--- a/lldb/include/lldb/Utility/Status.h
+++ b/lldb/include/lldb/Utility/Status.h
@@ -83,8 +83,7 @@ class ExpressionErrorBase
: public llvm::ErrorInfo<ExpressionErrorBase, CloneableECError> {
public:
using llvm::ErrorInfo<ExpressionErrorBase, CloneableECError>::ErrorInfo;
- ExpressionErrorBase(std::error_code ec, std::string msg = {})
- : ErrorInfo(ec) {}
+ ExpressionErrorBase(std::error_code ec) : ErrorInfo(ec) {}
lldb::ErrorType GetErrorType() const override;
static char ID;
};
More information about the lldb-commits
mailing list