[PATCH] D51918: [Support] sys::fs::directory_entry includes the file_type.

Kristina Brooks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 12 11:13:33 PDT 2018


kristina added a comment.

Style consistency.



================
Comment at: lib/Support/Unix/Path.inc:714
   errno = 0;
   dirent *cur_dir = ::readdir(reinterpret_cast<DIR *>(it.IterationHandle));
   if (cur_dir == nullptr && errno != 0) {
----------------
`cur_dir` should be `CurDir`, `it` should be uppercase `IT` in signature and throughout the function.


================
Comment at: lib/Support/Unix/Path.inc:718
   } else if (cur_dir != nullptr) {
     StringRef name(cur_dir->d_name);
     if ((name.size() == 1 && name[0] == '.') ||
----------------
`name` to `Name` if possible.


================
Comment at: lib/Support/Windows/Path.inc:951
 
   it.IterationHandle = intptr_t(FindHandle.take());
   SmallString<128> directory_entry_path(path);
----------------
`IT` instead of `it`. 'EC' instead of 'ec'.


================
Comment at: lib/Support/Windows/Path.inc:954
   path::append(directory_entry_path, directory_entry_name_utf8);
-  it.CurrentEntry = directory_entry(directory_entry_path, follow_symlinks,
-                                    status_from_find_data(&FirstFind));
+  it.CurrentEntry =
+      directory_entry(directory_entry_path, follow_symlinks,
----------------
Same as my previous comment, `IT` instead of `it`.


Repository:
  rL LLVM

https://reviews.llvm.org/D51918





More information about the llvm-commits mailing list