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


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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to