[PATCH] D88666: DirectoryWatcher: add an implementation for Windows
Saleem Abdulrasool via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 1 10:05:51 PDT 2020
compnerd added inline comments.
================
Comment at: clang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp:87
+ DWORD dwLength = GetFinalPathNameByHandleW(hDirectory, NULL, 0, 0);
+ std::unique_ptr<WCHAR[]> buffer{new WCHAR[dwLength + 1]};
+ (void)GetFinalPathNameByHandleW(hDirectory, buffer.get(), dwLength + 1, 0);
----------------
aaron.ballman wrote:
> Is a smart pointer required here or could you use `std::vector<WCHAR>` and reserve the space that way?
Sure, I can convert this to a `std::vector<WCHAR>` instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88666/new/
https://reviews.llvm.org/D88666
More information about the cfe-commits
mailing list