]> granicus.if.org Git - llvm/commitdiff
Fix uninitialized variable warnings in directory_entry default constructor. NFCI
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 4 Oct 2019 12:45:42 +0000 (12:45 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 4 Oct 2019 12:45:42 +0000 (12:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373742 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/FileSystem.h

index 7707306a9be6c774d0d90767e38eb06012ef13df..a29a9d787947f7e6d200b1d0cf62e56b13010127 100644 (file)
@@ -1215,9 +1215,9 @@ class directory_entry {
   // that whole structure, callers end up paying for a stat().
   // std::filesystem::directory_entry may be a better model.
   std::string Path;
-  file_type Type;           // Most platforms can provide this.
-  bool FollowSymlinks;      // Affects the behavior of status().
-  basic_file_status Status; // If available.
+  file_type Type = file_type::type_unknown; // Most platforms can provide this.
+  bool FollowSymlinks = true;               // Affects the behavior of status().
+  basic_file_status Status;                 // If available.
 
 public:
   explicit directory_entry(const Twine &Path, bool FollowSymlinks = true,