clang 20.0.0git
ASTImportError.h
Go to the documentation of this file.
1//===- ASTImportError.h - Define errors while importing AST -----*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the ASTImportError class which basically defines the kind
10// of error while importing AST .
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_AST_ASTIMPORTERROR_H
15#define LLVM_CLANG_AST_ASTIMPORTERROR_H
16
17#include "llvm/Support/Error.h"
18
19namespace clang {
20
21class ASTImportError : public llvm::ErrorInfo<ASTImportError> {
22public:
23 /// \brief Kind of error when importing an AST component.
24 enum ErrorKind {
25 NameConflict, /// Naming ambiguity (likely ODR violation).
26 UnsupportedConstruct, /// Not supported node or case.
27 Unknown /// Other error.
28 };
29
31
32 static char ID;
33
37 Error = Other.Error;
38 return *this;
39 }
41
42 std::string toString() const;
43
44 void log(llvm::raw_ostream &OS) const override;
45 std::error_code convertToErrorCode() const override;
46};
47
48} // namespace clang
49
50#endif // LLVM_CLANG_AST_ASTIMPORTERROR_H
std::error_code convertToErrorCode() const override
ASTImportError(ErrorKind Error)
ASTImportError & operator=(const ASTImportError &Other)
ASTImportError(const ASTImportError &Other)
std::string toString() const
Definition: ASTImporter.cpp:86
ErrorKind
Kind of error when importing an AST component.
@ Unknown
Not supported node or case.
@ UnsupportedConstruct
Naming ambiguity (likely ODR violation).
The JSON file list parser is used to communicate input to InstallAPI.
@ Other
Other implicit parameter.
#define log(__x)
Definition: tgmath.h:460