amaiorano added inline comments.

================
Comment at: lib/Format/Format.cpp:1920-1922
+  std::error_code EC = FS->makeAbsolute(Path);
+  assert(!EC);
+  (void)EC;
----------------
klimek wrote:
> I think if makeAbsolute doesn't work, we will probably want to err out here:
> if (EC) {
>   llvm::errs() << ... << EC.message << ...
>   return Style;
> }
Okay. I based myself on the fact that the old code didn't do error checking on 
fs::make_absolute - in fact most calls to fs::make_absolute in the codebase 
assert on the result. I suppose it's because it's just a string manipulation 
function, and if it fails, the subsequent code that will make use of the path 
will fail with a more useful error.

In any case, I don't mind handling the error here as you propose.



https://reviews.llvm.org/D27971



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to