[PATCH] D20942: [LockFileManager] Improve error output by adding error messages

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 21:39:11 PDT 2016


benlangmuir accepted this revision.
benlangmuir added a comment.
This revision is now accepted and ready to land.

LGTM.  Some minor suggestions.


================
Comment at: include/llvm/Support/LockFileManager.h:87
@@ +86,3 @@
+
+  /// \brief Get error message
+  std::string getErrorMessage() const;
----------------
Get the error message, or "" if there is no error.

================
Comment at: lib/Support/LockFileManager.cpp:193
@@ -189,1 +192,3 @@
+      auto EC = make_error_code(errc::no_space_on_device);
+      setError(EC);
       sys::fs::remove(UniqueLockFileName);
----------------
"failed to write to <file>"?

================
Comment at: lib/Support/LockFileManager.cpp:263
@@ +262,3 @@
+      OSS << ": " << Error->message();
+    OSS.flush();
+    return Str;
----------------
if you return OSS.str() you don't need the flush call


http://reviews.llvm.org/D20942





More information about the cfe-commits mailing list