Skip to content

Commit c80f484

Browse files
authored
[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)' ```
1 parent aabddc9 commit c80f484

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lldb/include/lldb/Utility/Status.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ class ExpressionErrorBase
8383
: public llvm::ErrorInfo<ExpressionErrorBase, CloneableECError> {
8484
public:
8585
using llvm::ErrorInfo<ExpressionErrorBase, CloneableECError>::ErrorInfo;
86-
ExpressionErrorBase(std::error_code ec, std::string msg = {})
87-
: ErrorInfo(ec) {}
86+
ExpressionErrorBase(std::error_code ec) : ErrorInfo(ec) {}
8887
lldb::ErrorType GetErrorType() const override;
8988
static char ID;
9089
};

0 commit comments

Comments
 (0)