class OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr

Declaration

class OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr
    : public Optional { /* full declaration omitted */ };

Description

Wrapper around Optional <DirectoryEntryRef > that degrades to 'const DirectoryEntry*', facilitating incremental patches to propagate DirectoryEntryRef. This class can be used as return value or field where it's convenient for an Optional <DirectoryEntryRef > to degrade to a 'const DirectoryEntry*'. The purpose is to avoid code churn due to dances like the following: FIXME: Once DirectoryEntryRef is "everywhere" and DirectoryEntry::LastRef and DirectoryEntry::getName have been deleted, delete this class and replace instances with Optional <DirectoryEntryRef >.

Declared at: clang/include/clang/Basic/DirectoryEntry.h:265

Inherits from: Optional

Method Overview

Methods

OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr()

Declared at: clang/include/clang/Basic/DirectoryEntry.h:268

OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr(
    clang::
        OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr&&)

Declared at: clang/include/clang/Basic/DirectoryEntry.h:269

Parameters

clang:: OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr&&

OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr(
    const clang::
        OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr&)

Declared at: clang/include/clang/Basic/DirectoryEntry.h:271

Parameters

const clang:: OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr&

OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr(
    llvm::NoneType)

Declared at: clang/include/clang/Basic/DirectoryEntry.h:278

Parameters

llvm::NoneType

OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr(
    clang::DirectoryEntryRef Ref)

Declared at: clang/include/clang/Basic/DirectoryEntry.h:279

Parameters

clang::DirectoryEntryRef Ref

OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr(
    Optional<clang::DirectoryEntryRef> MaybeRef)

Declared at: clang/include/clang/Basic/DirectoryEntry.h:281

Parameters

Optional<clang::DirectoryEntryRef> MaybeRef

const clang::DirectoryEntry*
operator const clang::DirectoryEntry*() const

Description

Degrade to 'const DirectoryEntry *' to allow DirectoryEntry::LastRef and DirectoryEntry::getName have been deleted, delete this class and replace instances with Optional <DirectoryEntryRef >

Declared at: clang/include/clang/Basic/DirectoryEntry.h:301