//===-- DiagnosticManager.h -------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLDB_EXPRESSION_DIAGNOSTICMANAGER_H #define LLDB_EXPRESSION_DIAGNOSTICMANAGER_H #include "lldb/lldb-defines.h" #include "lldb/lldb-types.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include <string> #include <vector> namespace lldb_private { /// A compiler-independent representation of a Diagnostic. Expression /// evaluation failures often have more than one diagnostic that a UI /// layer might want to render differently, for example to colorize /// it. /// /// Running example: /// (lldb) expr 1+foo /// error: <user expression 0>:1:3: use of undeclared identifier 'foo' /// 1+foo /// ^ struct DiagnosticDetail { … }; /// An llvm::Error used to communicate diagnostics in Status. Multiple /// diagnostics may be chained in an llvm::ErrorList. class ExpressionError : public llvm::ErrorInfo<ExpressionError, ExpressionErrorBase> { … }; enum DiagnosticOrigin { … }; const uint32_t LLDB_INVALID_COMPILER_ID = …; class Diagnostic { … }; DiagnosticList; class DiagnosticManager { … }; } #endif // LLDB_EXPRESSION_DIAGNOSTICMANAGER_H