Home | History | Annotate | Download | only in Sema

Lines Matching defs:Class

55   class UnqualUsingEntry {
91 class UnqualUsingDirectiveSet {
111 // A using-directive shall not appear in class scope, but may
242 // 3) Tag because it includes class templates, which can't
429 // A class name or enumeration name can be hidden by the name of
431 // scope. If a class or enumeration name and an object, function,
433 // with the same name, the class or enumeration name is hidden
547 /// the class at this point.
548 static bool CanDeclareSpecialMemberFunction(const CXXRecordDecl *Class) {
549 // We need to have a definition for the class.
550 if (!Class->getDefinition() || Class->isDependentContext())
553 // We can't be in the middle of defining the class.
554 return !Class->isBeingDefined();
557 void Sema::ForceDeclarationOfImplicitMembers(CXXRecordDecl *Class) {
558 if (!CanDeclareSpecialMemberFunction(Class))
562 if (Class->needsImplicitDefaultConstructor())
563 DeclareImplicitDefaultConstructor(Class);
566 if (Class->needsImplicitCopyConstructor())
567 DeclareImplicitCopyConstructor(Class);
570 if (Class->needsImplicitCopyAssignment())
571 DeclareImplicitCopyAssignment(Class);
575 if (Class->needsImplicitMoveConstructor())
576 DeclareImplicitMoveConstructor(Class); // might not actually do it
579 if (Class->needsImplicitMoveAssignment())
580 DeclareImplicitMoveAssignment(Class); // might not actually do it
584 if (Class->needsImplicitDestructor())
585 DeclareImplicitDestructor(Class);
618 CXXRecordDecl *Class = const_cast<CXXRecordDecl *>(Record);
620 S.DeclareImplicitDefaultConstructor(Class);
622 S.DeclareImplicitCopyConstructor(Class);
625 S.DeclareImplicitMoveConstructor(Class);
642 CXXRecordDecl *Class = const_cast<CXXRecordDecl *>(Record);
644 S.DeclareImplicitCopyAssignment(Class);
647 S.DeclareImplicitMoveAssignment(Class);
784 // stack) when we are parsing a member of a class template. In this
800 // In the definition of a member of a class template that appears
801 // outside of the namespace containing the class template
808 // class C { };
810 // template<class T> class B {
815 // template<class C> void N::B<C>::f(C) {
827 // template<class C>.
944 if (ObjCInterfaceDecl *Class = Method->getClassInterface()) {
946 if (ObjCIvarDecl *Ivar = Class->lookupInstanceVariable(
998 // example, inside a class without any base classes, we never need to
1103 /// \brief Find the declaration that a class temploid member specialization was
1117 // If it's a class template specialization, find the template or partial
1236 /// class LookupCriteria.
1375 /// declaration introduces a class name or enumeration name and the
1378 /// class or enumeration name if and only if the declarations are
1466 /// \brief Callback that looks for any member of a class with the given name.
1519 /// class LookupCriteria.
1561 // See also [class.mfct]p5 and [class.static.data]p2.
1569 // If this isn't a C++ class, we aren't allowed to look into base
1575 // If we're performing qualified name lookup into a dependent class,
1615 // These lookups will never find a member in a C++ class (or base class).
1629 // C++ [class.member.lookup]p2:
1687 // C++ [class.member.lookup]p5:
1689 // a base class T can unambiguously be found even if an object
1690 // has more than one base class subobject of type T.
1701 // Lookup in a base class succeeded; return these results.
1874 // Add the associated namespace for this class.
1919 // Add the associated namespace for this class.
1943 // argument-dependent lookup with an argument of class type
1947 CXXRecordDecl *Class) {
1950 if (Class->getDeclName() == Result.S.VAListTagName)
1955 // -- If T is a class type (including unions), its associated
1956 // classes are: the class itself; the class of which it is a
1961 // Add the class of which it is a member, if any.
1962 DeclContext *Ctx = Class->getDeclContext();
1965 // Add the associated namespace for this class.
1968 // Add the class itself. If we've already seen this class, we don't
1970 if (!Result.Classes.insert(Class))
1975 // templates, the member template's class; the namespaces and classes
1983 = dyn_cast<ClassTemplateSpecializationDecl>(Class)) {
1987 // Add the associated namespace for this class.
1996 if (!Class->hasDefinition()) {
1997 QualType type = Result.S.Context.getTypeDeclType(Class);
2006 Bases.push_back(Class);
2008 // Pop this class off the stack.
2009 Class = Bases.back();
2013 for (CXXRecordDecl::base_class_iterator Base = Class->bases_begin(),
2014 BaseEnd = Class->bases_end();
2027 // Find the associated namespace for this base class.
2031 // Make sure we visit the bases of this base class.
2061 #define TYPE(Class, Base)
2062 #define DEPENDENT_TYPE(Class, Base) case Type::Class:
2063 #define NON_CANONICAL_TYPE(Class, Base) case Type::Class:
2064 #define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:
2065 #define ABSTRACT_TYPE(Class, Base)
2090 // -- If T is a class type (including unions), its associated
2091 // classes are: the class itself; the class of which it is a
2096 CXXRecordDecl *Class
2098 addAssociatedClassesAndNamespaces(Result, Class);
2103 // the namespace in which it is defined. If it is class
2104 // member, its associated class is the member's class; else
2105 // it has no associated class.
2113 // Add the associated namespace for this class.
2136 // -- If T is a pointer to a member function of a class X, its
2141 // -- If T is a pointer to a data member of class X, its
2148 // Queue up the class type into which this points.
2327 // functions are ignored. However, if no operand has a class
2450 // there is no semantic difference for class types in this restricted
2476 // resolution. Lookup is only performed directly into the class since there
2492 // derived class. We do not implement this correctly in other cases
2550 /// \brief Look up the default constructor for the given class.
2551 CXXConstructorDecl *Sema::LookupDefaultConstructor(CXXRecordDecl *Class) {
2553 LookupSpecialMember(Class, CXXDefaultConstructor, false, false, false,
2559 /// \brief Look up the copying constructor for the given class.
2560 CXXConstructorDecl *Sema::LookupCopyingConstructor(CXXRecordDecl *Class,
2565 LookupSpecialMember(Class, CXXCopyConstructor, Quals & Qualifiers::Const,
2571 /// \brief Look up the moving constructor for the given class.
2572 CXXConstructorDecl *Sema::LookupMovingConstructor(CXXRecordDecl *Class,
2575 LookupSpecialMember(Class, CXXMoveConstructor, Quals & Qualifiers::Const,
2581 /// \brief Look up the constructors for the given class.
2582 DeclContext::lookup_result Sema::LookupConstructors(CXXRecordDecl *Class) {
2584 if (CanDeclareSpecialMemberFunction(Class)) {
2585 if (Class->needsImplicitDefaultConstructor())
2586 DeclareImplicitDefaultConstructor(Class);
2587 if (Class->needsImplicitCopyConstructor())
2588 DeclareImplicitCopyConstructor(Class);
2589 if (getLangOpts().CPlusPlus11 && Class->needsImplicitMoveConstructor())
2590 DeclareImplicitMoveConstructor(Class);
2593 CanQualType T = Context.getCanonicalType(Context.getTypeDeclType(Class));
2595 return Class->lookup(Name);
2598 /// \brief Look up the copying assignment operator for the given class.
2599 CXXMethodDecl *Sema::LookupCopyingAssignment(CXXRecordDecl *Class,
2607 LookupSpecialMember(Class, CXXCopyAssignment, Quals & Qualifiers::Const,
2615 /// \brief Look up the moving assignment operator for the given class.
2616 CXXMethodDecl *Sema::LookupMovingAssignment(CXXRecordDecl *Class,
2623 LookupSpecialMember(Class, CXXMoveAssignment, Quals & Qualifiers::Const,
2631 /// \brief Look for the destructor of the given class.
2636 /// \returns The destructor for this class.
2637 CXXDestructorDecl *Sema::LookupDestructor(CXXRecordDecl *Class) {
2638 return cast<CXXDestructorDecl>(LookupSpecialMember(Class, CXXDestructor,
2872 class ShadowContextRAII;
2874 class VisibleDeclsRecord {
2892 friend class ShadowContextRAII;
2919 class ShadowContextRAII {
2991 if (CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(Ctx))
2992 Result.getSema().ForceDeclarationOfImplicitMembers(Class);
3050 // class, e.g.,
3058 // Find results in this base class (and its bases).
3293 class TypoCorrectionConsumer : public VisibleDeclConsumer {
3467 class SpecifierInfo {
3480 class NamespaceSpecifierSet {
3639 if (ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(MemberContext)) {
3641 if (ObjCIvarDecl *Ivar = Class->lookupInstanceVariable(Name)) {
3648 if (ObjCPropertyDecl *Prop = Class->FindPropertyDeclaration(Name)) {
3716 Consumer.addKeywordResult("class");
3871 // dependent bases of class templates" feature.