Lines Matching full:linkage

14 #include "Linkage.h"
44 #include "clang/Basic/Linkage.h"
247 /// Get the most restrictive linkage for the types in the given
314 /// Get the most restrictive linkage for the types and
385 /// Merge in template-related linkage and visibility for the given
402 // The linkage of the specialization should be consistent with the in mergeTemplateLV()
464 /// Merge in template-related linkage and visibility for the given
476 // The linkage of the specialization should be consistent with the in mergeTemplateLV()
520 /// Merge in template-related linkage and visibility for the given
618 // A name having namespace scope (3.3.6) has internal linkage if it in getLVForNamespaceScopeDecl()
630 // constexpr then the identifier has internal linkage. in getLVForNamespaceScopeDecl()
641 // internal linkage in getLVForNamespaceScopeDecl()
675 // FIXME: This gives internal linkage to names that should have no linkage in getLVForNamespaceScopeDecl()
686 // within an unnamed namespace has internal linkage. in getLVForNamespaceScopeDecl()
696 // scope and no storage-class specifier, its linkage is in getLVForNamespaceScopeDecl()
737 // A name having namespace scope that has not been given internal linkage in getLVForNamespaceScopeDecl()
740 // has its linkage determined as follows: in getLVForNamespaceScopeDecl()
741 // - if the enclosing namespace has internal linkage, the name has in getLVForNamespaceScopeDecl()
742 // internal linkage; [handled above] in getLVForNamespaceScopeDecl()
744 // module and is not exported, the name has module linkage; in getLVForNamespaceScopeDecl()
745 // - otherwise, the name has external linkage. in getLVForNamespaceScopeDecl()
757 // A type without linkage shall not be used as the type of a in getLVForNamespaceScopeDecl()
758 // variable or function with external linkage unless in getLVForNamespaceScopeDecl()
759 // - the entity has C language linkage, or in getLVForNamespaceScopeDecl()
772 // because of this, but unique-external linkage suits us. in getLVForNamespaceScopeDecl()
800 // type unless it has C linkage (see comment above about variables in getLVForNamespaceScopeDecl()
822 // unique-external linkage, it's not legally usable from outside in getLVForNamespaceScopeDecl()
823 // this translation unit. However, we should use the C linkage in getLVForNamespaceScopeDecl()
827 // of a function could change its linkage. in getLVForNamespaceScopeDecl()
845 // for linkage purposes (7.1.3); or in getLVForNamespaceScopeDecl()
848 // has the typedef name for linkage purposes (7.1.3); or in getLVForNamespaceScopeDecl()
850 // Unnamed tags have no linkage. in getLVForNamespaceScopeDecl()
855 // linkage of the template and template arguments. We're at file in getLVForNamespaceScopeDecl()
862 // - an enumerator belonging to an enumeration with external linkage; or in getLVForNamespaceScopeDecl()
878 // within an unnamed namespace has internal linkage. All other namespaces in getLVForNamespaceScopeDecl()
879 // have external linkage. in getLVForNamespaceScopeDecl()
885 // By extension, we assign external linkage to Objective-C in getLVForNamespaceScopeDecl()
891 // A typedef declaration has linkage if it gives a type a name for in getLVForNamespaceScopeDecl()
892 // linkage purposes. in getLVForNamespaceScopeDecl()
897 // A GUID behaves like an inline variable with external linkage. Fall in getLVForNamespaceScopeDecl()
900 // Everything not covered here has no linkage. in getLVForNamespaceScopeDecl()
905 // If we ended up with non-externally-visible linkage, visibility should in getLVForNamespaceScopeDecl()
917 // Only certain class members have linkage. Note that fields don't in getLVForClassMember()
918 // really have linkage, but it's convenient to say they do for the in getLVForClassMember()
919 // purposes of calculating linkage of pointer-to-data-member in getLVForClassMember()
922 // Templates also don't officially have linkage, but since we ignore in getLVForClassMember()
924 // linkage and visibility of a template specialization, we might hit in getLVForClassMember()
926 // consider its linkage. in getLVForClassMember()
959 // The member has the same linkage as the class. If that's not externally in getLVForClassMember()
960 // visible, we don't need to compute anything about the linkage. in getLVForClassMember()
961 // FIXME: If we're only computing linkage, can we bail out here? in getLVForClassMember()
974 // of a function could change its linkage. in getLVForClassMember()
981 // If this is a method template specialization, use the linkage for in getLVForClassMember()
1026 // Modify the variable's linkage by its type, but ignore the in getLVForClassMember()
1030 // FIXME: If the type's linkage is not externally visible, we can in getLVForClassMember()
1083 Linkage L = LinkageComputer{} in isLinkageValid()
1143 // variable with C language linkage, and the other declares [...] a in isReserved()
1147 // names of variables and functions with C language linkage. in isReserved()
1176 Linkage NamedDecl::getLinkageInternal() const { in getLinkageInternal()
1198 /// Get the linkage from a semantic point of view. Entities in
1200 Linkage NamedDecl::getFormalLinkage() const { in getFormalLinkage()
1201 Linkage InternalLinkage = getLinkageInternal(); in getFormalLinkage()
1206 // the name has module linkage; in getFormalLinkage()
1210 // module linkage. in getFormalLinkage()
1211 if (isInNamedModule() && InternalLinkage == Linkage::External && in getFormalLinkage()
1215 InternalLinkage = Linkage::Module; in getFormalLinkage()
1311 // This lambda has its linkage/visibility determined by its owner. in getLVForClosure()
1329 // If the owner has a deduced type, we need to skip querying the linkage and in getLVForClosure()
1339 // A lambda never formally has linkage. But if the owner is externally in getLVForClosure()
1343 return LinkageInfo(Linkage::VisibleNone, OwnerLV.getVisibility(), in getLVForClosure()
1388 if (PrevLV.getLinkage() != Linkage::Invalid) in getLVForLocalDecl()
1439 return LinkageInfo(Linkage::VisibleNone, globalVisibility, in getLVForLocalDecl()
1446 return LinkageInfo(Linkage::VisibleNone, LV.getVisibility(), in getLVForLocalDecl()
1458 // linkage. in computeLVForDecl()
1464 // functions, types, templates, namespaces, and values ever have linkage. in computeLVForDecl()
1468 // declaration, so they do *not* have linkage. in computeLVForDecl()
1480 // C++ [basic.link]p4: an enumerator has the linkage of its enumeration. in computeLVForDecl()
1487 // A typedef declaration has linkage if it gives a type a name for in computeLVForDecl()
1488 // linkage purposes. in computeLVForDecl()
1534 // Handle linkage for namespace-scope names. in computeLVForDecl()
1542 // that the class or enumeration has the typedef name for linkage in computeLVForDecl()
1543 // purposes (7.1.3), has external linkage if the name of the class in computeLVForDecl()
1544 // has external linkage. in computeLVForDecl()
1551 // linkage. If there is a visible declaration of an entity with in computeLVForDecl()
1552 // linkage having the same name and type, ignoring entities in computeLVForDecl()
1555 // the linkage of the previous declaration. If there is more than in computeLVForDecl()
1558 // external linkage. in computeLVForDecl()
1563 // Names not covered by these rules have no linkage. in computeLVForDecl()
1567 /// getLVForDecl - Get the linkage and visibility for the given declaration.
1595 // We have just computed the linkage for this decl. By induction we know in getLVForDecl()
1626 // Namespaces never have module linkage. It is the entities within them in getOwningModuleForLinkage()
1636 // Module map modules have no special linkage semantics. in getOwningModuleForLinkage()
1648 // The global module shouldn't change the linkage. in getOwningModuleForLinkage()
1652 // The private module fragment is part of its containing module for linkage in getOwningModuleForLinkage()
1743 // Skip non-named contexts such as linkage specifications and ExportDecls. in printNestedNameSpecifier()
1914 case Linkage::Invalid: in hasLinkage()
1915 llvm_unreachable("Linkage hasn't been computed!"); in hasLinkage()
1916 case Linkage::None: in hasLinkage()
1918 case Linkage::Internal: in hasLinkage()
1920 case Linkage::UniqueExternal: in hasLinkage()
1921 case Linkage::VisibleNone: in hasLinkage()
1922 llvm_unreachable("Non-formal linkage is not allowed here!"); in hasLinkage()
1923 case Linkage::Module: in hasLinkage()
1924 case Linkage::External: in hasLinkage()
1927 llvm_unreachable("Unhandled Linkage enum"); in hasLinkage()
2185 // C++ [dcl.link]p1: All function types, function names with external linkage, in getDeclLanguageLinkage()
2186 // and variable names with external linkage have a language linkage. in getDeclLanguageLinkage()
2190 // Language linkage is a C++ concept, but saying that everything else in C has in getDeclLanguageLinkage()
2191 // C language linkage fits the implementation nicely. in getDeclLanguageLinkage()
2195 // C++ [dcl.link]p4: A C language linkage is ignored in determining the in getDeclLanguageLinkage()
2196 // language linkage of the names of class members and the function type of in getDeclLanguageLinkage()
2203 // will have C language linkage. If the first one is not in an extern "C" in getDeclLanguageLinkage()
2213 // language linkage or no language linkage. in isDeclExternC()
2248 // specifier or a linkage-specification and neither an initializer [...], in isThisDeclarationADefinition()
2308 // A declaration directly contained in a linkage-specification is treated in isThisDeclarationADefinition()
2310 // the linkage of the declared name and whether it is a definition. in isThisDeclarationADefinition()