File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -301,10 +301,7 @@ Example usage for a project using a compile commands database:
301301 }
302302
303303 if (Format == " mustache" ) {
304- if (auto Err = getMustacheHtmlFiles (argv[0 ], CDCtx)) {
305- llvm::errs () << toString (std::move (Err)) << " \n " ;
306- return 1 ;
307- }
304+ ExitOnErr (getMustacheHtmlFiles (argv[0 ], CDCtx));
308305 }
309306
310307 // Mapping phase
@@ -318,7 +315,6 @@ Example usage for a project using a compile commands database:
318315 << toString (std::move (Err)) << " \n " ;
319316 else {
320317 ExitOnErr (std::move (Err));
321- return 1 ;
322318 }
323319 }
324320
@@ -396,10 +392,7 @@ Example usage for a project using a compile commands database:
396392 llvm::outs () << " Generating docs...\n " ;
397393 ExitOnErr (G->generateDocs (OutDirectory, std::move (USRToInfo), CDCtx));
398394 llvm::outs () << " Generating assets for docs...\n " ;
399- Err = G->createResources (CDCtx);
400- if (Err) {
401- llvm::outs () << " warning: " << toString (std::move (Err)) << " \n " ;
402- }
395+ ExitOnErr (G->createResources (CDCtx));
403396
404397 return 0 ;
405398}
Original file line number Diff line number Diff line change 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
1+ // / Invalid output path (%t is a file, not a directory)
2+ // RUN: rm -rf %t && touch %t
3+ // RUN: not clang-doc %s -output=%t/subdir 2>&1 | FileCheck %s
4+ // CHECK: clang-doc error:
5+ // CHECK: {{(Not a directory|no such file or directory)}}
46
5- // BAD-OUTPUT: clang-doc error:
6- // BAD-OUTPUT: {{(Not a directory|no such file or directory)}}
7-
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'!
7+ // / Invalid format option
8+ // RUN: not clang-doc %s -format=badformat 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT
9+ // 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