File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -388,11 +388,8 @@ Example usage for a project using a compile commands database:
388388 sortUsrToInfo (USRToInfo);
389389
390390 // Ensure the root output directory exists.
391- if (std::error_code Err = llvm::sys::fs::create_directories (OutDirectory);
392- Err != std::error_code ()) {
393- ExitOnErr (llvm::createStringError (
394- llvm::inconvertibleErrorCode (), " Failed to create directory '%s': %s" ,
395- OutDirectory.c_str (), Err.message ().c_str ()));
391+ if (std::error_code Err = llvm::sys::fs::create_directories (OutDirectory)) {
392+ ExitOnErr (llvm::createFileError (OutDirectory, Err));
396393 }
397394
398395 // Run the generator.
Original file line number Diff line number Diff line change 1- // RUN: not clang-doc %S/Inputs/basic-project/src/Circle.cpp -output=/root/docs 2>&1 | FileCheck %s
1+ // Test: Invalid output path (%t is a file, not a directory)
2+ // RUN: rm -rf %t && echo "not a dir" > %t
3+ // RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck --check-prefix=BAD-OUTPUT %s
24
3- // CHECK: clang-doc error: Failed to create directory
5+ // BAD-OUTPUT: clang-doc error:
6+ // BAD-OUTPUT: Not a directory
47
8+ //
9+ // Test: Invalid format option
10+ // RUN: not clang-doc %s -format=badformat 2>&1 | FileCheck --check-prefix=BAD-FORMAT %s
11+
12+ // BAD-FORMAT: clang-doc: for the --format option: Cannot find option named 'badformat'!
You can’t perform that action at this time.
0 commit comments