clang API Documentation
#include <Type.h>
Public Types | |
| enum | DestructionKind { DK_none, DK_cxx_destructor, DK_objc_strong_lifetime, DK_objc_weak_lifetime } |
Public Member Functions | |
| QualType () | |
| QualType (const Type *Ptr, unsigned Quals) | |
| QualType (const ExtQuals *Ptr, unsigned Quals) | |
| unsigned | getLocalFastQualifiers () const |
| void | setLocalFastQualifiers (unsigned Quals) |
| const Type * | getTypePtr () const |
| const Type * | getTypePtrOrNull () const |
| const IdentifierInfo * | getBaseTypeIdentifier () const |
| Retrieves a pointer to the name of the base type. | |
| SplitQualType | split () const |
| void * | getAsOpaquePtr () const |
| const Type & | operator* () const |
| const Type * | operator-> () const |
| bool | isCanonical () const |
| bool | isCanonicalAsParam () const |
| bool | isNull () const |
| isNull - Return true if this QualType doesn't point to a type yet. | |
| bool | isLocalConstQualified () const |
| Determine whether this particular QualType instance has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level. | |
| bool | isConstQualified () const |
| Determine whether this type is const-qualified. | |
| bool | isLocalRestrictQualified () const |
| Determine whether this particular QualType instance has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level. | |
| bool | isRestrictQualified () const |
| Determine whether this type is restrict-qualified. | |
| bool | isLocalVolatileQualified () const |
| Determine whether this particular QualType instance has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level. | |
| bool | isVolatileQualified () const |
| Determine whether this type is volatile-qualified. | |
| bool | hasLocalQualifiers () const |
| Determine whether this particular QualType instance has any qualifiers, without looking through any typedefs that might add qualifiers at a different level. | |
| bool | hasQualifiers () const |
| Determine whether this type has any qualifiers. | |
| bool | hasLocalNonFastQualifiers () const |
| Determine whether this particular QualType instance has any "non-fast" qualifiers, e.g., those that are stored in an ExtQualType instance. | |
| Qualifiers | getLocalQualifiers () const |
| Retrieve the set of qualifiers local to this particular QualType instance, not including any qualifiers acquired through typedefs or other sugar. | |
| Qualifiers | getQualifiers () const |
| Retrieve the set of qualifiers applied to this type. | |
| unsigned | getLocalCVRQualifiers () const |
| Retrieve the set of CVR (const-volatile-restrict) qualifiers local to this particular QualType instance, not including any qualifiers acquired through typedefs or other sugar. | |
| unsigned | getCVRQualifiers () const |
| Retrieve the set of CVR (const-volatile-restrict) qualifiers applied to this type. | |
| bool | isConstant (ASTContext &Ctx) const |
| bool | isPODType (ASTContext &Context) const |
| Determine whether this is a Plain Old Data (POD) type (C++ 3.9p10). | |
| bool | isCXX11PODType (ASTContext &Context) const |
| bool | isTrivialType (ASTContext &Context) const |
| bool | isTriviallyCopyableType (ASTContext &Context) const |
| void | addConst () |
| addConst - add the specified type qualifier to this QualType. | |
| QualType | withConst () const |
| void | addVolatile () |
| addVolatile - add the specified type qualifier to this QualType. | |
| QualType | withVolatile () const |
| void | addRestrict () |
| Add the restrict qualifier to this QualType. | |
| QualType | withRestrict () const |
| QualType | withCVRQualifiers (unsigned CVR) const |
| void | addFastQualifiers (unsigned TQs) |
| void | removeLocalConst () |
| void | removeLocalVolatile () |
| void | removeLocalRestrict () |
| void | removeLocalCVRQualifiers (unsigned Mask) |
| void | removeLocalFastQualifiers () |
| void | removeLocalFastQualifiers (unsigned Mask) |
| QualType | withFastQualifiers (unsigned TQs) const |
| QualType | withExactLocalFastQualifiers (unsigned TQs) const |
| QualType | withoutLocalFastQualifiers () const |
| QualType | getCanonicalType () const |
| QualType | getLocalUnqualifiedType () const |
| Return this type with all of the instance-specific qualifiers removed, but without removing any qualifiers that may have been applied through typedefs. | |
| QualType | getUnqualifiedType () const |
| Retrieve the unqualified variant of the given type, removing as little sugar as possible. | |
| SplitQualType | getSplitUnqualifiedType () const |
| bool | isMoreQualifiedThan (QualType Other) const |
| Determine whether this type is more qualified than the other given type, requiring exact equality for non-CVR qualifiers. | |
| bool | isAtLeastAsQualifiedAs (QualType Other) const |
| Determine whether this type is at least as qualified as the other given type, requiring exact equality for non-CVR qualifiers. | |
| QualType | getNonReferenceType () const |
| QualType | getNonLValueExprType (ASTContext &Context) const |
| Determine the type of a (typically non-lvalue) expression with the specified result type. | |
| QualType | getDesugaredType (const ASTContext &Context) const |
| SplitQualType | getSplitDesugaredType () const |
| QualType | getSingleStepDesugaredType (const ASTContext &Context) const |
| Return the specified type with one level of "sugar" removed from the type. | |
| QualType | IgnoreParens () const |
| std::string | getAsString () const |
| std::string | getAsString (const PrintingPolicy &Policy) const |
| void | getAsStringInternal (std::string &Str, const PrintingPolicy &Policy) const |
| void | dump (const char *s) const |
| void | dump () const |
| void | Profile (llvm::FoldingSetNodeID &ID) const |
| unsigned | getAddressSpace () const |
| getAddressSpace - Return the address space of this type. | |
| Qualifiers::GC | getObjCGCAttr () const |
| getObjCGCAttr - Returns gc attribute of this type. | |
| bool | isObjCGCWeak () const |
| isObjCGCWeak true when Type is objc's weak. | |
| bool | isObjCGCStrong () const |
| isObjCGCStrong true when Type is objc's strong. | |
| Qualifiers::ObjCLifetime | getObjCLifetime () const |
| getObjCLifetime - Returns lifetime attribute of this type. | |
| bool | hasNonTrivialObjCLifetime () const |
| bool | hasStrongOrWeakObjCLifetime () const |
| DestructionKind | isDestructedType () const |
| bool | isCForbiddenLValueType () const |
| Determine whether expressions of the given type are forbidden from being lvalues in C. | |
| bool | hasTrivialAssignment (ASTContext &Context, bool Copying) const |
| Determine whether this type has trivial copy/move-assignment semantics. | |
Static Public Member Functions | |
| static QualType | getFromOpaquePtr (const void *Ptr) |
| static std::string | getAsString (SplitQualType split) |
| static std::string | getAsString (const Type *ty, Qualifiers qs) |
| static void | getAsStringInternal (SplitQualType split, std::string &out, const PrintingPolicy &policy) |
| static void | getAsStringInternal (const Type *ty, Qualifiers qs, std::string &out, const PrintingPolicy &policy) |
Friends | |
| class | QualifierCollector |
| bool | operator== (const QualType &LHS, const QualType &RHS) |
| bool | operator!= (const QualType &LHS, const QualType &RHS) |
QualType - For efficiency, we don't store CV-qualified types as nodes on their own: instead each reference to a type stores the qualifiers. This greatly reduces the number of nodes we need to allocate for types (for example we only need one for 'int', 'const int', 'volatile int', 'const volatile int', etc).
As an added efficiency bonus, instead of making this a pair, we just store the two bits we care about in the low bits of the pointer. To handle the packing/unpacking, we make QualType be a simple wrapper class that acts like a smart pointer. A third bit indicates whether there are extended qualifiers present, in which case the pointer points to a special structure.
| clang::QualType::QualType | ( | const Type * | Ptr, |
| unsigned | Quals | ||
| ) | [inline] |
| clang::QualType::QualType | ( | const ExtQuals * | Ptr, |
| unsigned | Quals | ||
| ) | [inline] |
| void clang::QualType::addConst | ( | ) | [inline] |
addConst - add the specified type qualifier to this QualType.
Definition at line 654 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), and clang::Qualifiers::Const.
Referenced by clang::Sema::ActOnStringLiteral(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildObjCEncodeExpression(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), GetFullTypeForDeclarator(), and clang::Sema::TryCaptureVar().
| void clang::QualType::addFastQualifiers | ( | unsigned | TQs | ) | [inline] |
Definition at line 681 of file Type.h.
References clang::Qualifiers::FastMask.
Referenced by withFastQualifiers().
| void clang::QualType::addRestrict | ( | ) | [inline] |
Add the restrict qualifier to this QualType.
Definition at line 670 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), and clang::Qualifiers::Restrict.
| void clang::QualType::addVolatile | ( | ) | [inline] |
addVolatile - add the specified type qualifier to this QualType.
Definition at line 662 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), and clang::Qualifiers::Volatile.
| void QualType::dump | ( | const char * | s | ) | const |
Definition at line 1138 of file TypePrinter.cpp.
References getAsStringInternal().
Referenced by clang::CanQual< ObjCObjectType >::dump(), and clang::arcmt::trans::MigrationContext::dumpGCAttrs().
| void QualType::dump | ( | ) | const |
Definition at line 1146 of file TypePrinter.cpp.
| unsigned clang::QualType::getAddressSpace | ( | ) | const [inline] |
getAddressSpace - Return the address space of this type.
Definition at line 4566 of file Type.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckParameter(), clang::Sema::CheckVariableDeclaration(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::ASTContext::getAddrSpaceQualType(), and HandleAddressSpaceTypeAttribute().
| void* clang::QualType::getAsOpaquePtr | ( | ) | const [inline] |
Definition at line 540 of file Type.h.
Referenced by clang::idx::ASTLocation::ASTLocation(), clang::DependentDiagnostic::Create(), clang::CanQual< ObjCObjectType >::getAsOpaquePtr(), llvm::PointerLikeTypeTraits< clang::QualType >::getAsVoidPointer(), clang::CanQual< T >::getFromOpaquePtr(), llvm::DenseMapInfo< clang::QualType >::getHashValue(), clang::serialization::UnsafeQualTypeDenseMapInfo::getHashValue(), clang::sema::DelayedDiagnostic::makeForbiddenType(), clang::QualTypeOrdering::operator()(), clang::operator<<(), clang::ComplexType::Profile(), clang::PointerType::Profile(), clang::BlockPointerType::Profile(), clang::ReferenceType::Profile(), clang::MemberPointerType::Profile(), clang::ConstantArrayType::Profile(), clang::IncompleteArrayType::Profile(), clang::DependentSizedArrayType::Profile(), clang::DependentSizedExtVectorType::Profile(), clang::VectorType::Profile(), clang::FunctionNoProtoType::Profile(), clang::AttributedType::Profile(), clang::SubstTemplateTypeParmType::Profile(), clang::AutoType::Profile(), clang::PackExpansionType::Profile(), clang::ObjCObjectTypeImpl::Profile(), clang::ObjCObjectPointerType::Profile(), clang::AtomicType::Profile(), clang::StandardConversionSequence::setAllToTypes(), clang::StandardConversionSequence::setFromType(), clang::AmbiguousConversionSequence::setFromType(), clang::BadConversionSequence::setFromType(), clang::TemplateArgument::setIntegralType(), clang::ObjCMessageExpr::setSuper(), clang::StandardConversionSequence::setToType(), clang::AmbiguousConversionSequence::setToType(), clang::BadConversionSequence::setToType(), clang::TemplateArgument::TemplateArgument(), clang::TryReferenceInit(), clang::CodeGen::CGDebugInfo::UpdateCompletedType(), and clang::InheritanceHierarchyWriter::WriteNodeReference().
| std::string clang::QualType::getAsString | ( | ) | const [inline] |
Definition at line 818 of file Type.h.
References clang::Qualifiers::getAsString().
Referenced by CompareReturnTypes(), ConvertTypeToDiagnosticString(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), DumpCXXRecordLayout(), clang::ASTContext::DumpRecordLayout(), clang::Sema::getAmbiguousPathsDisplayString(), clang::idx::ASTLocation::print(), clang::NestedNameSpecifier::print(), clang::FunctionProtoType::printExceptionSpecification(), TryStaticDowncast(), clang::CXXRecordDecl::viewInheritance(), clang::InheritanceHierarchyWriter::WriteGraph(), and clang::InheritanceHierarchyWriter::WriteNode().
| static std::string clang::QualType::getAsString | ( | SplitQualType | split | ) | [inline, static] |
Definition at line 821 of file Type.h.
References clang::Qualifiers::getAsString(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
| std::string QualType::getAsString | ( | const Type * | ty, |
| Qualifiers | qs | ||
| ) | [static] |
Definition at line 1209 of file TypePrinter.cpp.
References getAsStringInternal().
| std::string clang::QualType::getAsString | ( | const PrintingPolicy & | Policy | ) | const [inline] |
Definition at line 826 of file Type.h.
References clang::Qualifiers::getAsStringInternal(), and S.
| void clang::QualType::getAsStringInternal | ( | std::string & | Str, |
| const PrintingPolicy & | Policy | ||
| ) | const [inline] |
Definition at line 831 of file Type.h.
References clang::Qualifiers::getAsStringInternal().
Referenced by clang::PredefinedExpr::ComputeName(), clang::Sema::ConvertToIntegralOrEnumerationType(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), dump(), FormatFunctionParameter(), getAsString(), GetCompletionTypeString(), and clang::TemplateArgument::print().
| static void clang::QualType::getAsStringInternal | ( | SplitQualType | split, |
| std::string & | out, | ||
| const PrintingPolicy & | policy | ||
| ) | [inline, static] |
Definition at line 835 of file Type.h.
References clang::Qualifiers::getAsStringInternal(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
| void QualType::getAsStringInternal | ( | const Type * | ty, |
| Qualifiers | qs, | ||
| std::string & | out, | ||
| const PrintingPolicy & | policy | ||
| ) | [static] |
Definition at line 1216 of file TypePrinter.cpp.
| const IdentifierInfo * QualType::getBaseTypeIdentifier | ( | ) | const |
Retrieves a pointer to the name of the base type.
Definition at line 45 of file Type.cpp.
References clang::Type::castAsArrayTypeUnsafe(), clang::Type::getAs(), getBaseTypeIdentifier(), clang::TypedefType::getDecl(), clang::RecordType::getDecl(), clang::EnumType::getDecl(), getElementType(), clang::NamedDecl::getIdentifier(), clang::Type::getPointeeType(), clang::Type::getTypeClass(), getTypePtr(), clang::Type::isArrayType(), clang::Type::isEnumeralType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), and NULL.
Referenced by clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), getBaseTypeIdentifier(), and hasSimilarParameters().
| QualType clang::QualType::getCanonicalType | ( | ) | const [inline] |
Definition at line 4490 of file Type.h.
References withFastQualifiers().
Referenced by clang::Sema::ActOnCXXTryBlock(), clang::Sema::AddConversionCandidate(), clang::BuiltinCandidateTypeSet::AddTypesConvertedFrom(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::CheckVectorOperands(), ConvertTypeToDiagnosticString(), clang::Sema::DeclareGlobalAllocationFunction(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::Sema::FindCompositePointerType(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenFunction::hasAggregateLLVMType(), clang::Sema::IsOverload(), clang::Sema::IsQualificationConversion(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSafeToConvert(), isTriviallyCopyableType(), clang::Sema::LookupQualifiedName(), clang::Sema::MergeFunctionDecl(), clang::Sema::PerformObjectMemberConversion(), SuggestInitializationFixit(), clang::Sema::UsualArithmeticConversions(), clang::InheritanceHierarchyWriter::WriteNode(), and clang::InheritanceHierarchyWriter::WriteNodeReference().
| unsigned clang::QualType::getCVRQualifiers | ( | ) | const [inline] |
Retrieve the set of CVR (const-volatile-restrict) qualifiers applied to this type.
Definition at line 4484 of file Type.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::CompareQualificationConversions(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::FindCompositePointerType(), GetFullTypeForDeclarator(), and clang::TryObjectArgumentInitialization().
| QualType clang::QualType::getDesugaredType | ( | const ASTContext & | Context | ) | const [inline] |
getDesugaredType - Return the specified type with any "sugar" removed from the type. This takes off typedefs, typeof's etc. If the outer level of the type is already concrete, it returns it unmodified. This is similar to getting the canonical type, but it doesn't remove *all* typedefs. For example, it returns "T*" as "T*", (not as "int*"), because the pointer is concrete.
Qualifiers are left in place.
Definition at line 785 of file Type.h.
Referenced by clang::ento::TypedRegion::getDesugaredLocationType(), and clang::ento::TypedValueRegion::getDesugaredValueType().
| static QualType clang::QualType::getFromOpaquePtr | ( | const void * | Ptr | ) | [inline, static] |
Definition at line 541 of file Type.h.
Referenced by clang::idx::ASTLocation::AsTypeLoc(), ConvertTypeToDiagnosticString(), clang::FormatASTNodeDiagnosticArgument(), clang::DependentDiagnostic::getAccessBaseObjectType(), clang::TemplateArgument::getAsType(), clang::serialization::UnsafeQualTypeDenseMapInfo::getEmptyKey(), clang::NonTypeTemplateParmDecl::getExpansionType(), clang::sema::DelayedDiagnostic::getForbiddenTypeOperand(), clang::CanQual< T >::getFromOpaquePtr(), clang::StandardConversionSequence::getFromType(), clang::AmbiguousConversionSequence::getFromType(), clang::BadConversionSequence::getFromType(), llvm::PointerLikeTypeTraits< clang::QualType >::getFromVoidPointer(), clang::TemplateArgument::getIntegralType(), clang::ObjCMessageExpr::getSuperType(), clang::serialization::UnsafeQualTypeDenseMapInfo::getTombstoneKey(), clang::StandardConversionSequence::getToType(), clang::AmbiguousConversionSequence::getToType(), clang::BadConversionSequence::getToType(), clang::TypeLoc::getType(), and clang::TypeLoc::getTypePtr().
| unsigned clang::QualType::getLocalCVRQualifiers | ( | ) | const [inline] |
Retrieve the set of CVR (const-volatile-restrict) qualifiers local to this particular QualType instance, not including any qualifiers acquired through typedefs or other sugar.
Definition at line 621 of file Type.h.
Referenced by clang::Sema::CheckOverridingFunctionReturnType(), clang::CanQual< ObjCObjectType >::getCVRQualifiers(), GetFullTypeForDeclarator(), and clang::IsStandardConversion().
| unsigned clang::QualType::getLocalFastQualifiers | ( | ) | const [inline] |
Definition at line 520 of file Type.h.
Referenced by clang::serialization::UnsafeQualTypeDenseMapInfo::getHashValue(), clang::ASTWriter::GetOrCreateTypeIdx(), clang::ASTWriter::getTypeIdx(), clang::serialization::MakeTypeID(), and clang::QualifierCollector::strip().
| Qualifiers clang::QualType::getLocalQualifiers | ( | ) | const [inline] |
Retrieve the set of qualifiers local to this particular QualType instance, not including any qualifiers acquired through typedefs or other sugar.
Definition at line 4470 of file Type.h.
References clang::Qualifiers::addFastQualifiers().
Referenced by clang::Sema::ActOnForEachDeclStmt(), clang::BuildSimilarlyQualifiedPointerType(), GetCompletionTypeString(), clang::CanQual< ObjCObjectType >::getQualifiers(), clang::ASTImporter::Import(), clang::ASTContext::mergeObjCGCQualifiers(), and clang::ASTContext::mergeTypes().
| QualType clang::QualType::getLocalUnqualifiedType | ( | ) | const [inline] |
Return this type with all of the instance-specific qualifiers removed, but without removing any qualifiers that may have been applied through typedefs.
Definition at line 724 of file Type.h.
Referenced by clang::BuiltinCandidateTypeSet::AddTypesConvertedFrom(), clang::Sema::AttachBaseSpecifiers(), clang::BuildSimilarlyQualifiedPointerType(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckExceptionSpecSubset(), DiagnoseNarrowingInInitList(), clang::IsStandardConversion(), and clang::TryObjectArgumentInitialization().
| QualType QualType::getNonLValueExprType | ( | ASTContext & | Context | ) | const |
Determine the type of a (typically non-lvalue) expression with the specified result type.
This routine should be used for expressions for which the return type is explicitly specified (e.g., in a cast or call) and isn't necessarily an lvalue. It removes a top-level reference (since there are no expressions of reference type) and deletes top-level cvr-qualifiers from non-class types (in C++) or all types (in C).
Definition at line 1524 of file Type.cpp.
References clang::ASTContext::getLangOptions(), getTypePtr(), getUnqualifiedType(), clang::Type::isDependentType(), and clang::Type::isRecordType().
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildCXXMemberCallExpr(), clang::Sema::BuildOverloadedArrowExpr(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), EvaluateBinaryTypeTrait(), clang::FunctionType::getCallResultType(), clang::ObjCMethodDecl::getSendResultType(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), tryObjCWritebackConversion(), and TryRefInitWithConversionFunction().
| QualType clang::QualType::getNonReferenceType | ( | ) | const [inline] |
getNonReferenceType - If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const int"). Otherwise, returns the type itself. This routine is used throughout Sema to implement C++ 5p6:
If an expression initially has the type "reference to T" (8.3.2, 8.5.3), the type is adjusted to "T" prior to any further analysis, the expression designates the object or function denoted by the reference, and the expression is an lvalue.
Definition at line 4617 of file Type.h.
References clang::Type::getAs().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::AddConversionCandidate(), clang::Sema::AddCXXDirectInitializerToDecl(), clang::Sema::AddInitializerToDecl(), AddObjCKeyValueCompletions(), BuildBlockDeclRefExpr(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildDeclarationNameExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), clang::Sema::BuildMemberInitializer(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CodeCompleteCall(), clang::Sema::CodeCompleteExpression(), clang::Sema::CodeCompleteObjCPropertySynthesizeIvar(), clang::Sema::ConvertToIntegralOrEnumerationType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::InitializationSequence::Diagnose(), clang::Sema::diagnoseARCUnbridgedCast(), clang::Sema::DiagnosePropertyAccessorMismatch(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::Sema::EmitRelatedResultTypeNote(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), clang::FindConversionForRefInit(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CFGImplicitDtor::getDestructorDecl(), clang::UnresolvedMemberExpr::getNamingClass(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), clang::Sema::HandleFunctionTypeMismatch(), handleNonNullAttr(), IsAcceptableNonMemberOperatorCandidate(), IsConstProperty(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::APValue::printPretty(), clang::Sema::TryCaptureVar(), and TryRefInitWithConversionFunction().
| Qualifiers::GC clang::QualType::getObjCGCAttr | ( | ) | const [inline] |
getObjCGCAttr - Returns gc attribute of this type.
getObjCGCAttr - Return the gc attribute of this type.
Definition at line 4571 of file Type.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::ASTContext::getObjCGCAttrKind(), clang::ASTContext::getObjCGCQualType(), handleObjCGCTypeAttr(), and clang::IsStandardConversion().
| Qualifiers::ObjCLifetime clang::QualType::getObjCLifetime | ( | ) | const [inline] |
getObjCLifetime - Returns lifetime attribute of this type.
Definition at line 867 of file Type.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFields(), clang::Sema::ActOnProperty(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::BuildCXXNew(), BuildImplicitMemberInitializer(), clang::Sema::BuildPseudoDestructorExpr(), checkAllAtProps(), clang::Sema::CheckAllocatedType(), checkARCPropertyImpl(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckObjCARCConversion(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), clang::Sema::CheckParameter(), clang::Sema::CheckTemplateTypeArgument(), clang::Sema::checkUnsafeAssigns(), clang::Sema::checkUnsafeExprAssigns(), clearRedundantStrongs(), computeBlockInfo(), considerVariable(), clang::Sema::DiagnoseNontrivial(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), EmitExprForReferenceBinding(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), EvaluateUnaryTypeTrait(), findRetainCycleOwner(), GetGCAttrTypeForType(), clang::ASTContext::getInnerObjCOwnership(), clang::ASTContext::getLifetimeQualifiedType(), hasTrivialAssignment(), inferARCLifetimeForPointee(), inferARCWriteback(), clang::Sema::inferObjCARCLifetime(), isCXX11PODType(), isPODType(), clang::IsStandardConversion(), isTriviallyCopyableType(), isTrivialType(), setImpliedPropertyAttributeForReadOnlyProperty(), shouldExtendReceiverForInnerPointerMessage(), transferARCOwnershipToDeclSpec(), and tryEmitARCRetainLoadOfScalar().
| Qualifiers clang::QualType::getQualifiers | ( | ) | const [inline] |
Retrieve the set of qualifiers applied to this type.
Definition at line 4478 of file Type.h.
References clang::Qualifiers::addFastQualifiers().
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), clang::AdoptQualifiers(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildFieldReferenceExpr(), BuildImplicitBaseInitializer(), clang::BuildSimilarlyQualifiedPointerType(), checkConditionalObjectPointersCompatibility(), CheckOriginalCallArgDeduction(), clang::Sema::CodeCompleteMemberReferenceExpr(), clang::CodeGen::CodeGenFunction::CreateAggTemp(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DiagnoseAssignmentResult(), EmitAnyExprToExn(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), EmitValToTemp(), clang::Sema::FindCompositeObjCPointerType(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), clang::CXXRecordDecl::getCopyAssignmentOperator(), clang::ASTContext::getTargetAddressSpace(), handleObjCOwnershipTypeAttr(), hasDirectOwnershipQualifier(), hasInconsistentOrSupersetQualifiersOf(), hasMangledSubstitutionQualifiers(), isAtLeastAsQualifiedAs(), IsConstNonVolatile(), isMoreQualifiedThan(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsQualificationConversion(), IsStructurallyEquivalent(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeVectorElt(), clang::Sema::PerformObjectArgumentInitialization(), StoreAnyExprIntoOneUnit(), clang::TryReferenceInit(), TryRefInitWithConversionFunction(), TryStaticCast(), and TypeInfoIsInStandardLibrary().
| QualType clang::QualType::getSingleStepDesugaredType | ( | const ASTContext & | Context | ) | const [inline] |
Return the specified type with one level of "sugar" removed from the type.
This routine takes off the first typedef, typeof, etc. If the outer level of the type is already concrete, it returns it unmodified.
Definition at line 798 of file Type.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType().
| SplitQualType clang::QualType::getSplitDesugaredType | ( | ) | const [inline] |
Definition at line 789 of file Type.h.
Referenced by clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), and clang::ASTContext::getVariableArrayDecayedType().
| SplitQualType clang::QualType::getSplitUnqualifiedType | ( | ) | const [inline] |
getSplitUnqualifiedType - Retrieve the unqualified variant of the given type, removing as little sugar as possible.
Like getUnqualifiedType(), but also returns the set of qualifiers that were built up.
The resulting type might still be qualified if it's an array type. To strip qualifiers even from within an array type, use ASTContext::getUnqualifiedArrayType.
Definition at line 4538 of file Type.h.
Referenced by clang::ASTContext::getUnqualifiedArrayType().
| const Type * clang::QualType::getTypePtr | ( | ) | const [inline] |
Retrieves a pointer to the underlying (unqualified) type. This should really return a const Type, but it's not worth changing all the users right now.
This function requires that the type not be NULL. If the type might be NULL, use the (slightly less efficient) getTypePtrOrNull().
Definition at line 4451 of file Type.h.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTag(), addAssociatedClassesAndNamespaces(), clang::ASTContext::adjustFunctionType(), clang::Sema::BuildCXXNew(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildQualifiedType(), BuildSingleCopyAssign(), CheckAddressOfOperand(), clang::Sema::CheckObjCARCConversion(), clang::EnumDecl::completeDefinition(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::TemplateTypeParmDecl::Create(), CreateNewFunctionDecl(), clang::CanQual< T >::CreateUnsafe(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::TypePropertyCache< Private >::ensure(), FindVA(), clang::Sema::FixOverloadedFunctionReference(), getBaseTypeIdentifier(), clang::ASTContext::getCanonicalNestedNameSpecifier(), clang::ASTContext::getCanonicalParamType(), clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), getCurrentInstantiationOf(), clang::ASTContext::getDeclAlign(), getElementType(), clang::ASTContext::getLegacyIntegralTypeEncoding(), getNonLValueExprType(), getRequiredQualification(), clang::ASTContext::getTypeInfo(), clang::ASTContext::getTypeInfoInChars(), clang::CanQual< ObjCObjectType >::getTypePtr(), clang::TypeLoc::getTypePtr(), GetUuidAttrOfType(), hasTrivialAssignment(), clang::ASTImporter::Import(), isCXX11PODType(), isHomogeneousAggregate(), clang::Sema::IsMemberPointerConversion(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Sema::IsOverload(), isPODType(), isSafeToConvert(), isSingleElementStruct(), clang::ASTImporter::IsStructurallyEquivalent(), isTrivialType(), clang::CodeGen::CodeGenFunction::IvarTypeWithAggrGCObjects(), clang::serialization::MakeTypeID(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mergeObjCGCQualifiers(), clang::StmtIteratorBase::NextVA(), print_elem(), printIntegral(), clang::CodeGen::CodeGenTypes::UpdateCompletedType(), and clang::ASTNodeImporter::VisitMemberPointerType().
| const Type * clang::QualType::getTypePtrOrNull | ( | ) | const [inline] |
| QualType clang::QualType::getUnqualifiedType | ( | ) | const [inline] |
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
This routine looks through various kinds of sugar to find the least-desugared type that is unqualified. For example, given:
typedef int Integer; typedef const Integer CInteger; typedef CInteger DifferenceType;
Executing getUnqualifiedType() on the type DifferenceType will desugar until we hit the type Integer, which has no qualifiers on it.
The resulting type might still be qualified if it's an array type. To strip qualifiers even from within an array type, use ASTContext::getUnqualifiedArrayType.
Definition at line 4531 of file Type.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStmtExpr(), clang::Sema::AddConversionCandidate(), AdjustFunctionParmAndArgTypesForDeduction(), clang::AdoptQualifiers(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildImplicitBaseInitializer(), clang::BuildSimilarlyQualifiedPointerType(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), checkConditionalPointerCompatibility(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckLiteralOperatorDeclaration(), CheckOriginalCallArgDeduction(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckTemplateArgument(), clang::Sema::CodeCompleteObjCPropertySynthesizeIvar(), clang::CompareDerivedToBaseConversions(), clang::CompareStandardConversionSequences(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefaultLvalueConversion(), EmitDynamicCastCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), EvaluateBinaryTypeTrait(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::FindConversionForRefInit(), FormatFunctionParameter(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), getDefaultedDefaultConstructorUnsafe(), getNonLValueExprType(), GetReturnType(), clang::ASTContext::getSignatureParameterType(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), clang::InitializedEntity::InitializeParameter(), clang::Sema::IsBlockPointerConversion(), clang::Sema::isInitListConstructor(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsQualificationConversion(), clang::IsStandardConversion(), IsStringInit(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeTransparentUnionType(), clang::ASTContext::mergeTypes(), clang::Sema::PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), TryClassUnification(), TryLValueToRValueCast(), TryRefInitWithConversionFunction(), TryStaticDowncast(), and clang::TryUserDefinedConversion().
| bool clang::QualType::hasLocalNonFastQualifiers | ( | ) | const [inline] |
Determine whether this particular QualType instance has any "non-fast" qualifiers, e.g., those that are stored in an ExtQualType instance.
Definition at line 606 of file Type.h.
Referenced by clang::serialization::MakeTypeID(), and clang::QualifierCollector::strip().
| bool clang::QualType::hasLocalQualifiers | ( | ) | const [inline] |
Determine whether this particular QualType instance has any qualifiers, without looking through any typedefs that might add qualifiers at a different level.
Definition at line 596 of file Type.h.
Referenced by clang::UnqualTypeLoc::classof(), clang::QualifiedTypeLoc::classof(), clang::TypeSpecTypeLoc::classof(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getIncompleteArrayType(), clang::ASTContext::getVariableArrayType(), clang::CanQual< ObjCObjectType >::hasQualifiers(), clang::serialization::MakeTypeID(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
| bool clang::QualType::hasNonTrivialObjCLifetime | ( | ) | const [inline] |
| bool clang::QualType::hasQualifiers | ( | ) | const [inline] |
Determine whether this type has any qualifiers.
Definition at line 4526 of file Type.h.
Referenced by AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildAtomicType(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::DefaultLvalueConversion(), GetFullTypeForDeclarator(), clang::Sema::IsBlockPointerConversion(), clang::Expr::isNullPointerConstant(), and clang::ASTContext::mergeFunctionTypes().
| bool clang::QualType::hasStrongOrWeakObjCLifetime | ( | ) | const [inline] |
Definition at line 875 of file Type.h.
Referenced by clang::Sema::BuildCXXNew().
| bool QualType::hasTrivialAssignment | ( | ASTContext & | Context, |
| bool | Copying | ||
| ) | const |
Determine whether this type has trivial copy/move-assignment semantics.
Definition at line 2292 of file Type.cpp.
References clang::ASTContext::getLangOptions(), getObjCLifetime(), getTypePtr(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by clang::Sema::DefineImplicitCopyAssignment(), and clang::Sema::DefineImplicitMoveAssignment().
| QualType clang::QualType::IgnoreParens | ( | ) | const [inline] |
IgnoreParens - Returns the specified type after dropping any outer-level parentheses.
Definition at line 804 of file Type.h.
Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
| bool clang::QualType::isAtLeastAsQualifiedAs | ( | QualType | other | ) | const [inline] |
Determine whether this type is at least as qualified as the other given type, requiring exact equality for non-CVR qualifiers.
isAtLeastAsQualifiedAs - Determine whether this type is at last as qualified as the Other type. For example, "const volatile int" is at least as qualified as "const int", "volatile int", "int", and "const volatile int".
Definition at line 4604 of file Type.h.
References getQualifiers().
Referenced by checkObjCPointerTypesForAssignment(), clang::CanQual< ObjCObjectType >::isAtLeastAsQualifiedAs(), clang::Sema::isObjCPointerConversion(), TryClassUnification(), and clang::TryObjectArgumentInitialization().
| bool clang::QualType::isCanonical | ( | ) | const [inline] |
Definition at line 4495 of file Type.h.
Referenced by checkBlockPointerTypesForAssignment(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::Sema::CheckTemplateIdType(), clang::CanQual< T >::CreateUnsafe(), DeduceTemplateArguments(), clang::ASTContext::getAtomicType(), clang::ASTContext::getBlockPointerType(), clang::ASTContext::getComplexType(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getElaboratedType(), clang::ASTContext::getExtVectorType(), clang::CanQual< T >::getFromOpaquePtr(), clang::ASTContext::getFunctionNoProtoType(), clang::ASTContext::getFunctionType(), clang::ASTContext::getIncompleteArrayType(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getMemberPointerType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCObjectType(), clang::ASTContext::getPackExpansionType(), clang::ASTContext::getParenType(), clang::ASTContext::getPointerType(), clang::ASTContext::getRValueReferenceType(), clang::ASTContext::getSubstTemplateTypeParmType(), clang::ASTContext::getVariableArrayType(), clang::ASTContext::getVectorType(), and clang::Sema::MergeFunctionDecl().
| bool clang::QualType::isCanonicalAsParam | ( | ) | const [inline] |
Definition at line 4499 of file Type.h.
References clang::Type::hasSizedVLAType(), and clang::Type::isVariablyModifiedType().
Referenced by clang::CanQual< ObjCObjectType >::isCanonicalAsParam().
| bool clang::QualType::isCForbiddenLValueType | ( | ) | const [inline] |
Determine whether expressions of the given type are forbidden from being lvalues in C.
The expression types that are forbidden to be lvalues are:
The exact rule here is C99 6.3.2.1: An lvalue is an expression with an object type or an incomplete type other than void.
Definition at line 4624 of file Type.h.
Referenced by CheckIndirectionOperand(), and clang::Sema::CreateBuiltinArraySubscriptExpr().
| bool clang::QualType::isConstant | ( | ASTContext & | Ctx | ) | const [inline] |
Definition at line 629 of file Type.h.
Referenced by clang::CodeGen::CodeGenFunction::CreateStaticVarDecl(), and DeclIsConstantGlobal().
| bool clang::QualType::isConstQualified | ( | ) | const [inline] |
Determine whether this type is const-qualified.
Definition at line 4510 of file Type.h.
Referenced by clang::Sema::AddInitializerToDecl(), BuildImplicitMemberInitializer(), clang::Sema::CheckFieldDecl(), CheckForModifiableLvalue(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckParameter(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), EvaluateUnaryTypeTrait(), clang::CXXRecordDecl::getCopyAssignmentOperator(), clang::ento::MemRegionManager::getVarRegion(), HandleLValueToRValueConversion(), inferARCLifetimeForPointee(), IsConstProperty(), isPointerToConst(), clang::Sema::ShouldDeleteCopyAssignmentOperator(), clang::Sema::ShouldDeleteMoveAssignmentOperator(), clang::Sema::ShouldDeleteSpecialMember(), tryCaptureAsConstant(), TryConstructorInitialization(), tryEmitARCRetainLoadOfScalar(), clang::TryListConversion(), and clang::TryReferenceInit().
| bool QualType::isCXX11PODType | ( | ASTContext & | Context | ) | const |
isCXX11PODType() - Return true if this is a POD type according to the more relaxed rules of the C++11 standard, regardless of the current compilation's language. (C++0x [basic.types]p9)
Definition at line 1219 of file Type.cpp.
References clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), clang::ASTContext::getLangOptions(), getObjCLifetime(), getTypePtr(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isObjCLifetimeType(), clang::Type::isScalarType(), clang::Type::isVectorType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
| DestructionKind clang::QualType::isDestructedType | ( | ) | const [inline] |
isDestructedType - nonzero if objects of this type require non-trivial work to clean up after. Non-zero because it's conceivable that qualifiers (objc_gc(weak)?) could make something require destruction.
Definition at line 890 of file Type.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), emitCXXDestructMethod(), EmitDeclDestroy(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), enterBlockScope(), and clang::CodeGen::CodeGenFunction::EnterDtorCleanups().
| bool clang::QualType::isLocalConstQualified | ( | ) | const [inline] |
Determine whether this particular QualType instance has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.
Definition at line 566 of file Type.h.
References clang::Qualifiers::Const.
Referenced by clang::CanQual< ObjCObjectType >::isConstQualified().
| bool clang::QualType::isLocalRestrictQualified | ( | ) | const [inline] |
Determine whether this particular QualType instance has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.
Definition at line 576 of file Type.h.
References clang::Qualifiers::Restrict.
Referenced by clang::CanQual< ObjCObjectType >::isRestrictQualified().
| bool clang::QualType::isLocalVolatileQualified | ( | ) | const [inline] |
Determine whether this particular QualType instance has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.
Definition at line 586 of file Type.h.
References clang::Qualifiers::Volatile.
Referenced by clang::CanQual< ObjCObjectType >::isVolatileQualified().
| bool clang::QualType::isMoreQualifiedThan | ( | QualType | other | ) | const [inline] |
Determine whether this type is more qualified than the other given type, requiring exact equality for non-CVR qualifiers.
isMoreQualifiedThan - Determine whether this type is more qualified than the Other type. For example, "const volatile int" is more qualified than "const int", "volatile int", and "int". However, it is not more qualified than "const volatile int".
Definition at line 4594 of file Type.h.
References clang::Qualifiers::compatiblyIncludes(), and getQualifiers().
Referenced by clang::Sema::CheckOverridingFunctionReturnType(), clang::CompareQualificationConversions(), clang::CompareStandardConversionSequences(), and clang::CanQual< ObjCObjectType >::isMoreQualifiedThan().
| bool clang::QualType::isNull | ( | ) | const [inline] |
isNull - Return true if this QualType doesn't point to a type yet.
Definition at line 559 of file Type.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnBuiltinOffsetOf(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnClassMessage(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnCXXThis(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), AddClassMessageCompletions(), clang::Sema::AddMethodCandidate(), AddObjCKeyValueCompletions(), AddOrdinaryNameResults(), AddResultTypeChunk(), AdjustFunctionParmAndArgTypesForDeduction(), clang::TreeTransform< Derived >::AlreadyTransformed(), clang::ento::ProgramState::assumeInBound(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildClassMessageImplicit(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemInitializer(), clang::BuildSimilarlyQualifiedPointerType(), clang::Sema::BuildUnaryTransformType(), clang::Sema::BuildVAArgExpr(), clang::arcmt::trans::canApplyWeak(), clang::Expr::CanThrow(), clang::ento::StoreManager::CastRetrievedVal(), clang::Sema::CheckAdditionOperands(), checkAllAtProps(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFunctionDeclaration(), CheckIndirectionOperand(), clang::Sema::checkInitMethod(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckVariableDeclaration(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorLogicalOperands(), checkWeakGCAttrs(), clang::Sema::CodeCompleteCall(), clang::Sema::CodeCompleteDeclSpec(), clang::Sema::CodeCompleteExpression(), clang::Sema::CodeCompleteObjCClassMessage(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::Sema::CodeCompleteObjCMethodDecl(), clang::Sema::CodeCompleteReturn(), clang::Sema::containsUnexpandedParameterPacks(), convertPointersToCompositeType(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::CanQual< T >::CreateUnsafe(), clang::Sema::CXXCheckConditionalOperands(), DecodeTypeFromStr(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), EmitExprForReferenceBinding(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), errorForGCAttrsOnNonObjC(), FindDesignatorMismatch(), FindImplementableMethods(), clang::ASTContext::getAutoDeductType(), clang::ASTContext::getAutoRRefDeductType(), clang::ASTContext::getAutoType(), clang::Sema::getCopyElisionCandidate(), getCurrentInstantiationOf(), clang::ASTContext::getDependentNameType(), clang::Sema::getDestructorName(), clang::Sema::getElaboratedType(), clang::ento::StoreManager::GetElementZeroRegion(), clang::TypeLoc::getFullDataSizeForType(), GetFullTypeForDeclarator(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ASTContext::getInnerObjCOwnership(), clang::Sema::getMostSpecialized(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTContext::getObjCClassRedefinitionType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::ASTContext::getObjCIdRedefinitionType(), clang::ASTContext::getObjCSelRedefinitionType(), clang::ASTWriter::GetOrCreateTypeIdx(), getPreferredArgumentTypeForMessageSend(), clang::ASTContext::getPromotedIntegerType(), clang::ObjCPropertyRefExpr::getSetterArgType(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTReader::GetType(), clang::ASTContext::getTypedefType(), clang::Sema::GetTypeForDeclarator(), clang::Sema::GetTypeForDeclaratorCast(), clang::Sema::GetTypeFromParser(), clang::ASTWriter::getTypeIdx(), clang::Sema::getTypeName(), clang::ASTReader::GetTypeSourceInfo(), handleExtVectorTypeAttr(), HandleExtVectorTypeAttr(), clang::Sema::HandleFunctionTypeMismatch(), clang::ASTImporter::Import(), clang::ASTNodeImporter::ImportDefinition(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::InitializationSequence::InitializationSequence(), clang::ASTReader::InitializeContext(), IsAcceptableNonMemberOperatorCandidate(), isCharSpecialization(), isCharType(), clang::Declarator::isDeclarationOfFunction(), clang::DeclarationName::isDependentName(), clang::Sema::isExprCallable(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::Sema::isNonTypeNestedNameSpecifier(), clang::CanQual< ObjCObjectType >::isNull(), isPODType(), IsStructurallyEquivalent(), isTrivialType(), clang::Sema::LookupMemberExpr(), clang::Sema::LookupQualifiedName(), clang::Sema::LookupTemplateName(), clang::serialization::MakeTypeID(), MarkUsedTemplateParameters(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::ASTContext::mergeFunctionArgumentTypes(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTransparentUnionType(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclTypes(), clang::ParenListExpr::ParenListExpr(), clang::Sema::ParseObjCProtocolExpression(), clang::Sema::ParseObjCStringLiteral(), clang::Sema::ParseTypedefDecl(), clang::Sema::PerformObjectMemberConversion(), RebuildDeclaratorInCurrentInstantiation(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), ResolveOverloadForDeduction(), clang::ASTContext::setBuiltinVaListType(), clang::ASTContext::setObjCConstantStringInterface(), clang::Expr::setType(), clang::Sema::SubstFunctionDeclType(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::Sema::SubstType(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformFunctionTypeParams(), clang::TreeTransform< Derived >::TransformReferenceType(), clang::TreeTransform< Derived >::TransformTemplateName(), clang::TreeTransform< Derived >::TransformType(), clang::RecursiveASTVisitor< Derived >::TraverseType(), clang::TryListConversion(), TryToFixInvalidVariablyModifiedType(), clang::Sema::tryToRecoverWithCall(), clang::ASTContext::typesAreBlockPointerCompatible(), clang::ASTContext::typesAreCompatible(), clang::Sema::UsualArithmeticConversions(), clang::Sema::UsualUnaryConversions(), clang::ASTNodeImporter::VisitAutoType(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ASTNodeImporter::VisitBlockPointerType(), clang::ASTNodeImporter::VisitCharacterLiteral(), clang::ASTNodeImporter::VisitComplexType(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitConstantArrayType(), clang::ASTNodeImporter::VisitCStyleCastExpr(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitElaboratedType(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitExtVectorType(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFunctionNoProtoType(), clang::ASTNodeImporter::VisitFunctionProtoType(), clang::ASTNodeImporter::VisitImplicitCastExpr(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitIncompleteArrayType(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitIntegerLiteral(), clang::ASTNodeImporter::VisitLValueReferenceType(), clang::ASTNodeImporter::VisitMemberPointerType(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCObjectPointerType(), clang::ASTNodeImporter::VisitObjCObjectType(), clang::ASTNodeImporter::VisitParenType(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitPointerType(), clang::ASTNodeImporter::VisitRValueReferenceType(), clang::ASTNodeImporter::VisitTemplateSpecializationType(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitTypeOfType(), clang::ASTNodeImporter::VisitUnaryOperator(), clang::ASTNodeImporter::VisitUnaryTransformType(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVariableArrayType(), and clang::ASTNodeImporter::VisitVectorType().
| bool clang::QualType::isObjCGCStrong | ( | ) | const [inline] |
isObjCGCStrong true when Type is objc's strong.
Definition at line 862 of file Type.h.
References clang::Qualifiers::getObjCGCAttr(), and clang::Qualifiers::Strong.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnPropertyImplDecl(), and GetGCAttrTypeForType().
| bool clang::QualType::isObjCGCWeak | ( | ) | const [inline] |
isObjCGCWeak true when Type is objc's weak.
Definition at line 857 of file Type.h.
References clang::Qualifiers::getObjCGCAttr(), and clang::Qualifiers::Weak.
Referenced by clang::Sema::ActOnProperty(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckVariableDeclaration(), clang::CodeGen::CodeGenFunction::emitByrefStructureInit(), clang::CodeGen::CodeGenFunction::GenerateCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateDestroyHelperFunction(), and GetGCAttrTypeForType().
| bool QualType::isPODType | ( | ASTContext & | Context | ) | const |
Determine whether this is a Plain Old Data (POD) type (C++ 3.9p10).
Definition at line 954 of file Type.cpp.
References clang::ASTContext::getBaseElementType(), clang::ASTContext::getLangOptions(), getObjCLifetime(), getTypePtr(), isNull(), isPODType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by clang::Sema::BuildArrayType(), clang::Sema::BuildVAArgExpr(), clang::Sema::DefaultVariadicArgumentPromotion(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), EmitMemberInitializer(), EvaluateUnaryTypeTrait(), and isPODType().
| bool clang::QualType::isRestrictQualified | ( | ) | const [inline] |
Determine whether this type is restrict-qualified.
Definition at line 4515 of file Type.h.
Referenced by clang::CollectVRQualifiers(), and clang::CodeGen::CodeGenFunction::EmitFunctionProlog().
| bool QualType::isTriviallyCopyableType | ( | ASTContext & | Context | ) | const |
isTriviallyCopyableType - Return true if this is a trivially copyable type (C++0x [basic.types]p9)
Definition at line 1075 of file Type.cpp.
References clang::ASTContext::getBaseElementType(), getCanonicalType(), clang::ASTContext::getLangOptions(), getObjCLifetime(), isTrivialType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by clang::Sema::BuildAtomicType(), and EvaluateUnaryTypeTrait().
| bool QualType::isTrivialType | ( | ASTContext & | Context | ) | const |
isTrivialType - Return true if this is a trivial type (C++0x [basic.types]p9)
Definition at line 1014 of file Type.cpp.
References clang::ASTContext::getBaseElementType(), clang::ASTContext::getLangOptions(), getObjCLifetime(), getTypePtr(), isNull(), isTrivialType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by EvaluateUnaryTypeTrait(), isTriviallyCopyableType(), and isTrivialType().
| bool clang::QualType::isVolatileQualified | ( | ) | const [inline] |
Determine whether this type is volatile-qualified.
Definition at line 4521 of file Type.h.
Referenced by clang::Sema::AddInitializerToDecl(), clang::CollectVRQualifiers(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::InitializationSequence::Diagnose(), DiagnoseSelfAssignment(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), EmitObjectDelete(), EvaluateUnaryTypeTrait(), ExtractSubobject(), clang::Sema::getCopyElisionCandidate(), HandleLValueToRValueConversion(), clang::AtomicExpr::isVolatile(), clang::InitializationSequence::Perform(), StoreAnyExprIntoOneUnit(), tryEmitARCRetainLoadOfScalar(), and clang::TryListConversion().
| void clang::QualType::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const [inline] |
Definition at line 846 of file Type.h.
Referenced by clang::ento::CompoundValData::Profile(), clang::TemplateArgument::Profile(), clang::ParenType::Profile(), and clang::ElaboratedType::Profile().
| void clang::QualType::removeLocalConst | ( | ) | [inline] |
Definition at line 4545 of file Type.h.
References clang::Qualifiers::Const.
| void clang::QualType::removeLocalCVRQualifiers | ( | unsigned | Mask | ) | [inline] |
Definition at line 4557 of file Type.h.
References clang::Qualifiers::CVRMask, and clang::Qualifiers::FastMask.
| void clang::QualType::removeLocalFastQualifiers | ( | ) | [inline] |
Definition at line 692 of file Type.h.
Referenced by clang::serialization::MakeTypeID(), and withoutLocalFastQualifiers().
| void clang::QualType::removeLocalFastQualifiers | ( | unsigned | Mask | ) | [inline] |
Definition at line 693 of file Type.h.
References clang::Qualifiers::FastMask.
| void clang::QualType::removeLocalRestrict | ( | ) | [inline] |
Definition at line 4549 of file Type.h.
References clang::Qualifiers::Restrict.
| void clang::QualType::removeLocalVolatile | ( | ) | [inline] |
Definition at line 4553 of file Type.h.
References clang::Qualifiers::Volatile.
| void clang::QualType::setLocalFastQualifiers | ( | unsigned | Quals | ) | [inline] |
| SplitQualType clang::QualType::split | ( | ) | const [inline] |
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition at line 4459 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), clang::Qualifiers::fromFastMask(), clang::ExtQuals::getBaseType(), and clang::ExtQuals::getQualifiers().
Referenced by handleObjCOwnershipTypeAttr(), and clang::CanQual< ObjCObjectType >::split().
| QualType clang::QualType::withConst | ( | ) | const [inline] |
Definition at line 657 of file Type.h.
References clang::Qualifiers::Const.
Referenced by clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnPredefinedExpr(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildCXXUuidof(), clang::ObjCMethodDecl::createImplicitParams(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), DecodeTypeFromStr(), clang::ASTContext::getConstType(), and clang::CanQual< ObjCObjectType >::withConst().
| QualType clang::QualType::withCVRQualifiers | ( | unsigned | CVR | ) | const [inline] |
Definition at line 677 of file Type.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitLValueForBitfield(), and clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset().
| QualType clang::QualType::withExactLocalFastQualifiers | ( | unsigned | TQs | ) | const [inline] |
Definition at line 708 of file Type.h.
References withFastQualifiers().
| QualType clang::QualType::withFastQualifiers | ( | unsigned | TQs | ) | const [inline] |
Definition at line 700 of file Type.h.
References addFastQualifiers().
Referenced by clang::QualifierCollector::apply(), getCanonicalType(), clang::ASTContext::getQualifiedType(), clang::ASTContext::getRestrictType(), clang::ASTReader::GetType(), clang::ASTContext::getVolatileType(), and withExactLocalFastQualifiers().
| QualType clang::QualType::withoutLocalFastQualifiers | ( | ) | const [inline] |
Definition at line 713 of file Type.h.
References removeLocalFastQualifiers().
Referenced by getCoreType().
| QualType clang::QualType::withRestrict | ( | ) | const [inline] |
Definition at line 673 of file Type.h.
References clang::Qualifiers::Restrict.
Referenced by DecodeTypeFromStr().
| QualType clang::QualType::withVolatile | ( | ) | const [inline] |
Definition at line 665 of file Type.h.
References clang::Qualifiers::Volatile.
friend class QualifierCollector [friend] |