================
@@ -299,8 +299,7 @@ Example usage for a project using a compile commands 
database:
   llvm::outs() << "Generating assets for docs...\n";
   Err = G->get()->createResources(CDCtx);
   if (Err) {
-    llvm::errs() << toString(std::move(Err)) << "\n";
-    return 1;
+    llvm::outs() << "Warning: " << toString(std::move(Err)) << "\n";
----------------
ilovepi wrote:

@petrhosek do you know if there's a better way to emit a warning from 
clang-tools? I'm hesitant to say this is a good practice. I see this in 
clang-tidy, but IDK if that's really an idiomatic way to handle it. 
https://github.com/llvm/llvm-project/blob/c091dd48008ba6d85aee68227077ee05daeb7ca7/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp#L640

In clang or LLVM, we'd normally use one of the Reports APIs, but I don't think 
we have access to those in clang-doc. not sure what the right thing to do here 
is.

Also,  think we normally use lower-case `warning:`.

https://github.com/llvm/llvm-project/pull/93928
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to