[PATCH] D65627: [clang-doc] Continue after mapping error

Diego Astiazarán via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 18:28:50 PDT 2019


DiegoAstiazaran created this revision.
DiegoAstiazaran added reviewers: jakehehrlich, juliehockett.
DiegoAstiazaran added a project: clang-tools-extra.
Herald added subscribers: kadircet, arphaman.

The tool used to stop execution if there was an error in the mapping phase. It will now show the error but continue with the files that were mapped correctly.


https://reviews.llvm.org/D65627

Files:
  clang-tools-extra/clang-doc/tool/ClangDocMain.cpp


Index: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
===================================================================
--- clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+++ clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
@@ -228,10 +228,10 @@
   llvm::outs() << "Mapping decls...\n";
   auto Err =
       Exec->get()->execute(doc::newMapperActionFactory(CDCtx), ArgAdjuster);
-  if (Err) {
-    llvm::errs() << toString(std::move(Err)) << "\n";
-    return 1;
-  }
+  if (Err)
+    llvm::errs() << "Error mapping decls in files. Clang-doc will ignore these "
+                    "files and continue:\n"
+                 << toString(std::move(Err)) << "\n";
 
   // Collect values into output by key.
   // In ToolResults, the Key is the hashed USR and the value is the


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65627.212947.patch
Type: text/x-patch
Size: 783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190802/8f787761/attachment-0001.bin>


More information about the cfe-commits mailing list