[PATCH] D124774: [clang][ASTImporter][NFC]: Address a fixme in ASTImporterSharedState.h
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 2 23:44:42 PDT 2022
balazske added a comment.
The `ASTImporterLookupTable` was not dependent on the `ImportError` so the header should not be included in that file. It is better in **ASTImporterSharedState.h**. Alternative solution is to add class `ASTImportError` into **ASTImporterSharedState.h** (no new header is needed) and use this file from **ASTImporter.h**.
================
Comment at: clang/include/clang/AST/ASTImportError.h:1
+//===- ASTImporter.h - Import Error while Importing AST -------*- C++ -*-===//
+//
----------------
================
Comment at: clang/include/clang/AST/ASTImportError.h:22
+
+class ImportError : public llvm::ErrorInfo<ImportError> {
+public:
----------------
Rename to `ASTImportError`.
================
Comment at: clang/include/clang/AST/ASTImporter.h:17
-#include "clang/AST/APValue.h"
+#include "clang/AST/ASTImporterLookupTable.h"
#include "clang/AST/DeclBase.h"
----------------
Include **ASTImportError.h**.
================
Comment at: clang/include/clang/AST/ASTImporterLookupTable.h:17
+#include "clang/AST/ASTImportError.h"
#include "clang/AST/DeclBase.h" // lookup_result
----------------
This include is not needed here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124774/new/
https://reviews.llvm.org/D124774
More information about the cfe-commits
mailing list