From: Alexander Shaposhnikov Date: Thu, 20 Oct 2016 21:20:35 +0000 (+0000) Subject: [clang] Remove FileEntry copy-constructor X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95e8a8a86651f1ea3e3e0e307d937ddf3de5f61a;p=clang [clang] Remove FileEntry copy-constructor Code cleanup: address FIXME in the file include/clang/Basic/FileManager.h and remove copy-constructor of the class FileEntry. Test plan: make check-clang Differential revision: https://reviews.llvm.org/D22712 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284782 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h index 8539e8ee9e..7bee4c5968 100644 --- a/include/clang/Basic/FileManager.h +++ b/include/clang/Basic/FileManager.h @@ -65,6 +65,7 @@ class FileEntry { mutable std::unique_ptr File; friend class FileManager; + FileEntry(const FileEntry &) = delete; void operator=(const FileEntry &) = delete; public: @@ -72,15 +73,6 @@ public: : UniqueID(0, 0), IsNamedPipe(false), InPCH(false), IsValid(false) {} - // FIXME: this is here to allow putting FileEntry in std::map. Once we have - // emplace, we shouldn't need a copy constructor anymore. - /// Intentionally does not copy fields that are not set in an uninitialized - /// \c FileEntry. - FileEntry(const FileEntry &FE) : UniqueID(FE.UniqueID), - IsNamedPipe(FE.IsNamedPipe), InPCH(FE.InPCH), IsValid(FE.IsValid) { - assert(!isValid() && "Cannot copy an initialized FileEntry"); - } - StringRef getName() const { return Name; } StringRef tryGetRealPathName() const { return RealPathName; } bool isValid() const { return IsValid; }