Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions clang/include/clang/Basic/DirectoryEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ namespace FileMgr {
/// the private optional_none_tag to keep it to the size of a single pointer.
template <class RefTy> class MapEntryOptionalStorage {
using optional_none_tag = typename RefTy::optional_none_tag;
RefTy MaybeRef;
RefTy MaybeRef = optional_none_tag();

public:
MapEntryOptionalStorage() : MaybeRef(optional_none_tag()) {}
MapEntryOptionalStorage() = default;

template <class... ArgTypes>
explicit MapEntryOptionalStorage(std::in_place_t, ArgTypes &&...Args)
Expand Down Expand Up @@ -168,11 +168,7 @@ class OptionalStorage<clang::DirectoryEntryRef>
clang::FileMgr::MapEntryOptionalStorage<clang::DirectoryEntryRef>;

public:
OptionalStorage() = default;

template <class... ArgTypes>
explicit OptionalStorage(std::in_place_t, ArgTypes &&...Args)
: StorageImpl(std::in_place_t{}, std::forward<ArgTypes>(Args)...) {}
using StorageImpl::StorageImpl;

OptionalStorage &operator=(clang::DirectoryEntryRef Ref) {
StorageImpl::operator=(Ref);
Expand Down
6 changes: 1 addition & 5 deletions clang/include/clang/Basic/FileEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,7 @@ class OptionalStorage<clang::FileEntryRef>
clang::FileMgr::MapEntryOptionalStorage<clang::FileEntryRef>;

public:
OptionalStorage() = default;

template <class... ArgTypes>
explicit OptionalStorage(std::in_place_t, ArgTypes &&...Args)
: StorageImpl(std::in_place_t{}, std::forward<ArgTypes>(Args)...) {}
using StorageImpl::StorageImpl;

OptionalStorage &operator=(clang::FileEntryRef Ref) {
StorageImpl::operator=(Ref);
Expand Down