[PATCH] D86564: [Support][Windows] Fix incorrect GetFinalPathNameByHandleW() return value check in realPathFromHandle()

Aleksandr Platonov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 07:46:27 PDT 2020


ArcsinX added a comment.

Thank you for review.



================
Comment at: llvm/lib/Support/Windows/Path.inc:361
     CountChars = ::GetFinalPathNameByHandleW(
-        H, Buffer.data(), Buffer.capacity() - 1, FILE_NAME_NORMALIZED);
+        H, Buffer.data(), Buffer.capacity(), FILE_NAME_NORMALIZED);
   }
----------------
andrewng wrote:
> Sorry, just noticed that this invocation uses `Buffer.data()` whereas the call above uses `Buffer.begin()`. Would be good to make it the same. Looks like `begin()` is the preferred style in this file.
Thanks, fixed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86564/new/

https://reviews.llvm.org/D86564



More information about the llvm-commits mailing list