From 43ee7ce963b32a8b074a43587523905b5012e0b5 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 4 Oct 2019 12:45:42 +0000 Subject: [PATCH] Fix uninitialized variable warnings in directory_entry default constructor. NFCI llvm-svn: 373742 --- include/llvm/Support/FileSystem.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index 7707306a9be..a29a9d78794 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -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,