[PATCH] D154709: [clang][ASTImporter] Add a 'Message' member to ASTImportError use it throught ASTImporter

Michael Buch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 7 05:58:16 PDT 2023


Michael137 created this revision.
Michael137 added reviewers: martong, balazske.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: shafik.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added subscribers: cfe-commits, wangpc.
Herald added a project: clang.

This patch adds a new `ASTImportError::Message` which is used
to more accurately describe a failure when `ASTImportError::log`
is called. We then set this error message throughout ASTImporter.

The motivation for this is that in upcoming patches LLDB will
check `ASTImportError`s and log them on failures. At the moment
these logs wouldn't be helpful since we wouldn't be able to
differentiate between the different conflicts that occur
during a single import process.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154709

Files:
  clang/include/clang/AST/ASTImportError.h
  clang/lib/AST/ASTImporter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154709.538108.patch
Type: text/x-patch
Size: 13165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230707/c86e85f3/attachment-0001.bin>


More information about the cfe-commits mailing list