[PATCH] D41535: Add -vfsoverlay option for Clang-Tidy

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 19 04:24:24 PST 2018

ilya-biryukov added a comment.

Just a few more NITs and we're good to go

Comment at: clang-tidy/tool/ClangTidyMain.cpp:347
+    llvm::errs() << "Error: virtual filesystem overlay file '" << OverlayFile
+                 << "' not found.\n";
+    return nullptr;
We should probably print the error message (in addition to "not found", we could have permission errors, etc.)
`Buffer.getError().message()` would give a more informative message.

Comment at: clang-tidy/tool/ClangTidyMain.cpp:353
+      std::move(Buffer.get()), /*DiagHandler*/ nullptr, OverlayFile);
+  if (!FS.get()) {
+    llvm::errs() << "Error: invalid virtual filesystem overlay file '"
NIT: `if (!FS)` is equivalent, but less typing

Comment at: clang-tidy/tool/ClangTidyMain.cpp:437
+  if (!BaseFS) {
+    return 1;
+  }
NIT:  remove braces around a single-statement return.

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list