[clang-tools-extra] [clang-doc] Refactor error handling to use ExitOnError (PR #141699)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Thu May 29 09:27:39 PDT 2025
================
@@ -0,0 +1,12 @@
+// Test: Invalid output path (%t is a file, not a directory)
+// RUN: rm -rf %t && echo "not a dir" > %t
+// RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s
+
+// BAD-OUTPUT: clang-doc error:
+// BAD-OUTPUT: {{(Not a directory|no such file or directory)}}
+
+//
+// Test: Invalid format option
+// RUN: not clang-doc %s -format=badformat 2>&1 | FileCheck --check-prefix=BAD-FORMAT %s
+
+// BAD-FORMAT: clang-doc: for the --format option: Cannot find option named 'badformat'!
----------------
ilovepi wrote:
nit: need a newline at EOF to satisfy github.
https://github.com/llvm/llvm-project/pull/141699
More information about the cfe-commits
mailing list