@@ -186,7 +186,7 @@ handleFile(
186186 // Write the .bad.<generator> file
187187 auto badPath = expectedPath;
188188 path::replace_extension (badPath, llvm::Twine (" bad." ).concat (gen_->fileExtension ()));
189- if (auto exp = writeFile (badPath, generatedDocs))
189+ if (auto exp = writeFile (badPath, generatedDocs); !exp )
190190 {
191191 return report::error (" {}: \" {}\" " , exp.error (), badPath);
192192 }
@@ -206,7 +206,7 @@ handleFile(
206206 else if (testArgs.action == Action::update)
207207 {
208208 // Update the expected documentation
209- if (auto exp = writeFile (expectedPath, generatedDocs))
209+ if (auto exp = writeFile (expectedPath, generatedDocs); !exp )
210210 {
211211 return report::error (" {}: \" {}\" " , exp.error (), expectedPath);
212212 }
@@ -300,10 +300,8 @@ checkPath(
300300 std::string const & configPath = files::appendPath (inputPath, " mrdocs.yml" );
301301 if (files::exists (configPath)) {
302302 Config::Settings::load_file (dirSettings, configPath, dirs_).value ();
303- auto exp = dirSettings.normalize (dirs_);
304- if (!exp) {
305- report::error (" {}: \" {}\" " , exp.error (), configPath);
306- return ;
303+ if (auto exp = dirSettings.normalize (dirs_); !exp) {
304+ return report::error (" {}: \" {}\" " , exp.error (), configPath);
307305 }
308306 }
309307
0 commit comments