Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/include/clang/AST/DeclBase.h
Show First 20 Lines • Show All 776 Lines • ▼ Show 20 Lines | bool hasOwningModule() const { | ||||
return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned; | return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned; | ||||
} | } | ||||
/// Get the module that owns this declaration (for visibility purposes). | /// Get the module that owns this declaration (for visibility purposes). | ||||
Module *getOwningModule() const { | Module *getOwningModule() const { | ||||
return isFromASTFile() ? getImportedOwningModule() : getLocalOwningModule(); | return isFromASTFile() ? getImportedOwningModule() : getLocalOwningModule(); | ||||
} | } | ||||
/// Get the module that owns this declaration for linkage purposes. | /// Get the module that this declaration is attached to. | ||||
/// There only ever is such a module under the C++ Modules TS. | |||||
/// | /// | ||||
/// \param IgnoreLinkage Ignore the linkage of the entity; assume that | /// \param IgnoreLinkage Ignore ModuleInternalLinkage of the entity; assume | ||||
/// all declarations in a global module fragment are unowned. | /// that all declarations in a global module fragment attached to the GM. | ||||
Module *getOwningModuleForLinkage(bool IgnoreLinkage = false) const; | Module *getModuleAttachment(bool IgnoreLinkage = false) const; | ||||
/// Determine whether this declaration is definitely visible to name lookup, | /// Determine whether this declaration is definitely visible to name lookup, | ||||
/// independent of whether the owning module is visible. | /// independent of whether the owning module is visible. | ||||
/// Note: The declaration may be visible even if this returns \c false if the | /// Note: The declaration may be visible even if this returns \c false if the | ||||
/// owning module is visible within the query context. This is a low-level | /// owning module is visible within the query context. This is a low-level | ||||
/// helper function; most code should be calling Sema::isVisible() instead. | /// helper function; most code should be calling Sema::isVisible() instead. | ||||
bool isUnconditionallyVisible() const { | bool isUnconditionallyVisible() const { | ||||
return (int)getModuleOwnershipKind() <= (int)ModuleOwnershipKind::Visible; | return (int)getModuleOwnershipKind() <= (int)ModuleOwnershipKind::Visible; | ||||
▲ Show 20 Lines • Show All 1,858 Lines • Show Last 20 Lines |