class OptionalFileEntryRefDegradesToFileEntryPtr

Declaration

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

Description

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

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

Inherits from: Optional

Method Overview

Methods

OptionalFileEntryRefDegradesToFileEntryPtr()

Declared at: clang/include/clang/Basic/FileEntry.h:282

OptionalFileEntryRefDegradesToFileEntryPtr(
    clang::
        OptionalFileEntryRefDegradesToFileEntryPtr&&)

Declared at: clang/include/clang/Basic/FileEntry.h:283

Parameters

clang:: OptionalFileEntryRefDegradesToFileEntryPtr&&

OptionalFileEntryRefDegradesToFileEntryPtr(
    const clang::
        OptionalFileEntryRefDegradesToFileEntryPtr&)

Declared at: clang/include/clang/Basic/FileEntry.h:285

Parameters

const clang:: OptionalFileEntryRefDegradesToFileEntryPtr&

OptionalFileEntryRefDegradesToFileEntryPtr(
    llvm::NoneType)

Declared at: clang/include/clang/Basic/FileEntry.h:292

Parameters

llvm::NoneType

OptionalFileEntryRefDegradesToFileEntryPtr(
    clang::FileEntryRef Ref)

Declared at: clang/include/clang/Basic/FileEntry.h:293

Parameters

clang::FileEntryRef Ref

OptionalFileEntryRefDegradesToFileEntryPtr(
    Optional<clang::FileEntryRef> MaybeRef)

Declared at: clang/include/clang/Basic/FileEntry.h:295

Parameters

Optional<clang::FileEntryRef> MaybeRef

const clang::FileEntry*
operator const clang::FileEntry*() const

Description

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

Declared at: clang/include/clang/Basic/FileEntry.h:315