|
clang
5.0.0
|
A (possibly-)qualified type. More...
#include "clang/AST/Type.h"
Classes | |
| class | StreamedQualTypeHelper |
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 |
| Retrieves a pointer to the underlying (unqualified) type. More... | |
| const Type * | getTypePtrOrNull () const |
| const IdentifierInfo * | getBaseTypeIdentifier () const |
| Retrieves a pointer to the name of the base type. More... | |
| SplitQualType | split () const |
| Divides a QualType into its unqualified type and a set of local qualifiers. More... | |
| void * | getAsOpaquePtr () const |
| const Type & | operator* () const |
| const Type * | operator-> () const |
| bool | isCanonical () const |
| bool | isCanonicalAsParam () const |
| bool | isNull () const |
| Return true if this QualType doesn't point to a type yet. More... | |
| 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. More... | |
| bool | isConstQualified () const |
| Determine whether this type is const-qualified. More... | |
| 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. More... | |
| bool | isRestrictQualified () const |
| Determine whether this type is restrict-qualified. More... | |
| 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. More... | |
| bool | isVolatileQualified () const |
| Determine whether this type is volatile-qualified. More... | |
| 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. More... | |
| bool | hasQualifiers () const |
| Determine whether this type has any qualifiers. More... | |
| bool | hasLocalNonFastQualifiers () const |
| Determine whether this particular QualType instance has any "non-fast" qualifiers, e.g., those that are stored in an ExtQualType instance. More... | |
| Qualifiers | getLocalQualifiers () const |
| Retrieve the set of qualifiers local to this particular QualType instance, not including any qualifiers acquired through typedefs or other sugar. More... | |
| Qualifiers | getQualifiers () const |
| Retrieve the set of qualifiers applied to this type. More... | |
| 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. More... | |
| unsigned | getCVRQualifiers () const |
| Retrieve the set of CVR (const-volatile-restrict) qualifiers applied to this type. More... | |
| bool | isConstant (const ASTContext &Ctx) const |
| bool | isPODType (const ASTContext &Context) const |
| Determine whether this is a Plain Old Data (POD) type (C++ 3.9p10). More... | |
| bool | isCXX98PODType (const ASTContext &Context) const |
| Return true if this is a POD type according to the rules of the C++98 standard, regardless of the current compilation's language. More... | |
| bool | isCXX11PODType (const ASTContext &Context) const |
| 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. More... | |
| bool | isTrivialType (const ASTContext &Context) const |
| Return true if this is a trivial type per (C++0x [basic.types]p9) More... | |
| bool | isTriviallyCopyableType (const ASTContext &Context) const |
| Return true if this is a trivially copyable type (C++0x [basic.types]p9) More... | |
| void | addConst () |
Add the const type qualifier to this QualType. More... | |
| QualType | withConst () const |
| void | addVolatile () |
Add the volatile type qualifier to this QualType. More... | |
| QualType | withVolatile () const |
| void | addRestrict () |
Add the restrict qualifier to this QualType. More... | |
| 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. More... | |
| QualType | getUnqualifiedType () const |
| Retrieve the unqualified variant of the given type, removing as little sugar as possible. More... | |
| SplitQualType | getSplitUnqualifiedType () const |
| Retrieve the unqualified variant of the given type, removing as little sugar as possible. More... | |
| bool | isMoreQualifiedThan (QualType Other) const |
| Determine whether this type is more qualified than the other given type, requiring exact equality for non-CVR qualifiers. More... | |
| 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. More... | |
| QualType | getNonReferenceType () const |
| If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const
int"). More... | |
| QualType | getNonLValueExprType (const ASTContext &Context) const |
| Determine the type of a (typically non-lvalue) expression with the specified result type. More... | |
| QualType | getDesugaredType (const ASTContext &Context) const |
| Return the specified type with any "sugar" removed from the type. More... | |
| SplitQualType | getSplitDesugaredType () const |
| QualType | getSingleStepDesugaredType (const ASTContext &Context) const |
| Return the specified type with one level of "sugar" removed from the type. More... | |
| QualType | IgnoreParens () const |
| Returns the specified type after dropping any outer-level parentheses. More... | |
| std::string | getAsString () const |
| std::string | getAsString (const PrintingPolicy &Policy) const |
| void | print (raw_ostream &OS, const PrintingPolicy &Policy, const Twine &PlaceHolder=Twine(), unsigned Indentation=0) const |
| void | getAsStringInternal (std::string &Str, const PrintingPolicy &Policy) const |
| StreamedQualTypeHelper | stream (const PrintingPolicy &Policy, const Twine &PlaceHolder=Twine(), unsigned Indentation=0) const |
| void | dump (const char *s) const |
| void | dump () const |
| void | dump (llvm::raw_ostream &OS) const |
| void | Profile (llvm::FoldingSetNodeID &ID) const |
| unsigned | getAddressSpace () const |
| Return the address space of this type. More... | |
| Qualifiers::GC | getObjCGCAttr () const |
| Returns gc attribute of this type. More... | |
| bool | isObjCGCWeak () const |
| true when Type is objc's weak. More... | |
| bool | isObjCGCStrong () const |
| true when Type is objc's strong. More... | |
| Qualifiers::ObjCLifetime | getObjCLifetime () const |
| Returns lifetime attribute of this type. More... | |
| bool | hasNonTrivialObjCLifetime () const |
| bool | hasStrongOrWeakObjCLifetime () const |
| bool | isNonWeakInMRRWithObjCWeak (const ASTContext &Context) const |
| DestructionKind | isDestructedType () const |
| Returns a nonzero value if objects of this type require non-trivial work to clean up after. More... | |
| bool | isCForbiddenLValueType () const |
| Determine whether expressions of the given type are forbidden from being lvalues in C. More... | |
| QualType | substObjCTypeArgs (ASTContext &ctx, ArrayRef< QualType > typeArgs, ObjCSubstitutionContext context) const |
| Substitute type arguments for the Objective-C type parameters used in the subject type. More... | |
| QualType | substObjCMemberType (QualType objectType, const DeclContext *dc, ObjCSubstitutionContext context) const |
| Substitute type arguments from an object type for the Objective-C type parameters used in the subject type. More... | |
| QualType | stripObjCKindOfType (const ASTContext &ctx) const |
| Strip Objective-C "__kindof" types from the given type. More... | |
| QualType | getAtomicUnqualifiedType () const |
| Remove all qualifiers including _Atomic. More... | |
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 | print (SplitQualType split, raw_ostream &OS, const PrintingPolicy &policy, const Twine &PlaceHolder, unsigned Indentation=0) |
| static void | print (const Type *ty, Qualifiers qs, raw_ostream &OS, const PrintingPolicy &policy, const Twine &PlaceHolder, unsigned Indentation=0) |
| 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) |
| Indicate whether the specified types and qualifiers are identical. More... | |
| bool | operator!= (const QualType &LHS, const QualType &RHS) |
A (possibly-)qualified type.
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.
|
inline |
Definition at line 639 of file Type.h.
Referenced by substObjCTypeArgs().
|
inline |
Add the const type qualifier to this QualType.
Definition at line 779 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), and clang::Qualifiers::Const.
Referenced by clang::Sema::ActOnStringLiteral(), adjustCVQualifiersForCXXThisWithinLambda(), clang::Sema::BuildObjCEncodeExpression(), captureInLambda(), checkTrivialSubobjectCall(), findSubobject(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), GetFullTypeForDeclarator(), isVariableAlreadyCapturedInScopeInfo(), and clang::Sema::LookupSpecialMember().
|
inline |
Definition at line 806 of file Type.h.
References clang::Qualifiers::FastMask.
Referenced by withFastQualifiers().
|
inline |
Add the restrict qualifier to this QualType.
Definition at line 795 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), and clang::Qualifiers::Restrict.
|
inline |
Add the volatile type qualifier to this QualType.
Definition at line 787 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), and clang::Qualifiers::Volatile.
Referenced by clang::Sema::LookupSpecialMember().
| void QualType::dump | ( | const char * | s | ) | const |
Definition at line 2512 of file ASTDumper.cpp.
References dump().
Referenced by clang::CanQual< ObjCObjectType >::dump(), clang::Type::dump(), and clang::arcmt::trans::MigrationContext::dumpGCAttrs().
| LLVM_DUMP_METHOD void QualType::dump | ( | ) | const |
Definition at line 2518 of file ASTDumper.cpp.
References dump().
| LLVM_DUMP_METHOD void QualType::dump | ( | llvm::raw_ostream & | OS | ) | const |
Definition at line 2520 of file ASTDumper.cpp.
|
inline |
Return the address space of this type.
Definition at line 5605 of file Type.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckParameter(), clang::Sema::CheckVariableDeclarationType(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), findCompleteObject(), GenOpenCLArgMetadata(), clang::ASTContext::getAddrSpaceQualType(), clang::CodeGen::TargetCodeGenInfo::getGlobalVarAddressSpace(), clang::CodeGen::CodeGenModule::GetGlobalVarAddressSpace(), getOpenCLKernelParameterType(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::ASTContext::getTargetNullPointerValue(), HandleAddressSpaceTypeAttribute(), clang::Expr::isNullPointerConstant(), isValidSwiftContextType(), isValidSwiftIndirectResultType(), clang::Sema::PrepareScalarCast(), and processTypeAttrs().
|
inline |
Definition at line 664 of file Type.h.
Referenced by clang::CodeGen::CGDebugInfo::completeClass(), clang::CodeGen::CGDebugInfo::completeType(), clang::CodeGen::CGDebugInfo::completeUnusedClass(), clang::DependentDiagnostic::Create(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CanQual< ObjCObjectType >::getAsOpaquePtr(), llvm::PointerLikeTypeTraits< clang::QualType >::getAsVoidPointer(), clang::CanQual< T >::getFromOpaquePtr(), llvm::DenseMapInfo< clang::QualType >::getHashValue(), clang::serialization::UnsafeQualTypeDenseMapInfo::getHashValue(), clang::CodeGen::CGDebugInfo::getOrCreateStandaloneType(), clang::sema::DelayedDiagnostic::makeForbiddenType(), clang::QualTypeOrdering::operator()(), clang::operator<<(), clang::ComplexType::Profile(), clang::PointerType::Profile(), clang::AdjustedType::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::DependentUnaryTransformType::Profile(), clang::AttributedType::Profile(), clang::SubstTemplateTypeParmType::Profile(), clang::AutoType::Profile(), clang::DeducedTemplateSpecializationType::Profile(), clang::PackExpansionType::Profile(), clang::ObjCObjectTypeImpl::Profile(), clang::ObjCObjectPointerType::Profile(), clang::AtomicType::Profile(), clang::PipeType::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(), substObjCTypeArgs(), clang::TemplateArgument::TemplateArgument(), and TryReferenceInit().
|
inline |
Definition at line 942 of file Type.h.
References clang::Qualifiers::getAsString().
Referenced by clang::clone_detection::StmtDataCollector< T >::addData(), addFixitForObjCARCConversion(), AddOverloadParameterChunks(), checkTypeParamListConsistency(), CompareReturnTypes(), ConvertTypeToDiagnosticString(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), diagnoseUnavailableAlignedAllocation(), dumpMicrosoftThunkAdjustment(), clang::ASTContext::DumpRecordLayout(), DumpRecordLayout(), clang::ento::SymbolRegionValue::dumpToStream(), clang::ento::SymbolConjured::dumpToStream(), clang::ento::SymbolMetadata::dumpToStream(), clang::ento::SymbolCast::dumpToStream(), clang::ento::ElementRegion::dumpToStream(), clang::ento::CXXTempObjectRegion::dumpToStream(), FormatFunctionParameter(), GenOpenCLArgMetadata(), clang::TypeName::getFullyQualifiedName(), GetSignature(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), isNullPointerValueTemplateArgument(), NoteBuiltinOperatorCandidate(), OpenCLConvertScalarsToVectors(), rewriteToNSMacroDecl(), rewriteToObjCProperty(), SemaOpenCLBuiltinEnqueueKernel(), TryStaticDowncast(), clang::CXXRecordDecl::viewInheritance(), clang::ento::SValExplainer::VisitElementRegion(), clang::ento::SValExplainer::VisitSymbolConjured(), and clang::ento::SValExplainer::VisitSymbolMetadata().
|
inlinestatic |
Definition at line 945 of file Type.h.
References clang::Qualifiers::getAsString(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
|
static |
Definition at line 1733 of file TypePrinter.cpp.
| std::string QualType::getAsString | ( | const PrintingPolicy & | Policy | ) | const |
Definition at line 1727 of file TypePrinter.cpp.
|
inline |
Definition at line 967 of file Type.h.
Referenced by clang::Sema::CheckVirtualDtorCall(), clang::PredefinedExpr::ComputeName(), diagnoseNoViableConversion(), formatBlockPlaceholder(), FormatFunctionParameter(), and GetCompletionTypeString().
|
inlinestatic |
Definition at line 971 of file Type.h.
References clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
|
static |
Definition at line 1749 of file TypePrinter.cpp.
| QualType QualType::getAtomicUnqualifiedType | ( | ) | const |
Remove all qualifiers including _Atomic.
Definition at line 1297 of file Type.cpp.
References getTypePtr(), and getUnqualifiedType().
Referenced by Evaluate(), and EvaluateInPlace().
| const IdentifierInfo * QualType::getBaseTypeIdentifier | ( | ) | const |
Retrieves a pointer to the name of the base type.
Definition at line 46 of file Type.cpp.
References clang::Type::castAsArrayTypeUnsafe(), clang::Type::getAs(), getBaseTypeIdentifier(), clang::TypedefType::getDecl(), clang::RecordType::getDecl(), clang::EnumType::getDecl(), clang::NamedDecl::getIdentifier(), clang::Type::getPointeeType(), clang::Type::getTypeClass(), getTypePtr(), clang::Type::isArrayType(), clang::Type::isEnumeralType(), clang::Type::isPointerType(), clang::Type::isRecordType(), and clang::Type::isReferenceType().
Referenced by appendType(), getBaseTypeIdentifier(), hasSimilarParameters(), and clang::ento::ExprEngine::VisitCXXNewExpr().
|
inline |
Definition at line 5528 of file Type.h.
References withFastQualifiers().
Referenced by clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPLinearClause(), adjustReturnValue(), appendType(), clang::Sema::CheckExtVectorCast(), CheckMapClauseExpressionBase(), CheckMapConflicts(), checkOpenCLBlockArgs(), clang::Sema::checkOpenCLDisabledTypeDeclSpec(), checkOpenCLEnqueueVariadicArgs(), clang::Sema::CheckOpenMPLinearDecl(), checkVarTypeForConstantEmission(), ConvertTypeToDiagnosticString(), clang::CodeGen::CodeGenModule::CreateMetadataIdentifierForType(), DiagnoseBadConversion(), dumpMicrosoftThunkAdjustment(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::ento::SValBuilder::evalCast(), EvaluateBuiltinClassifyType(), findCompleteObject(), GenOpenCLArgMetadata(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getCanonicalType(), getComplexType(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::ObjCMethodCall::getRuntimeDefinition(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::InitListExpr::isTransparent(), isTriviallyCopyableType(), maybeRecoverWithZeroInitialization(), clang::Sema::MergeFunctionDecl(), SemaOpenCLBuiltinEnqueueKernel(), clang::Sema::setOpenCLExtensionForType(), shouldUseUndefinedBehaviorReturnOptimization(), SuggestInitializationFixit(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::ASTNodeImporter::VisitSubstTemplateTypeParmType(), and clang::ento::SValExplainer::VisitSymbolicRegion().
|
inline |
Retrieve the set of CVR (const-volatile-restrict) qualifiers applied to this type.
Definition at line 5522 of file Type.h.
Referenced by clang::Sema::CheckPointerToMemberOperands(), CheckTemplateArgumentIsCompatibleWithParameter(), checkTrivialSubobjectCall(), CompareQualificationConversions(), DeduceTemplateArgumentsByTypeMatch(), defaultedSpecialMemberIsConstexpr(), diagnoseRedundantReturnTypeQualifiers(), clang::Sema::FindCompositePointerType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Sema::SpecialMemberIsTrivial(), and TryObjectArgumentInitialization().
|
inline |
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 910 of file Type.h.
Referenced by clang::ento::TypedRegion::getDesugaredLocationType(), clang::ento::TypedValueRegion::getDesugaredValueType(), and clang::Sema::getMessageSendResultType().
|
inlinestatic |
Definition at line 665 of file Type.h.
Referenced by ConvertTypeToDiagnosticString(), clang::FormatASTNodeDiagnosticArgument(), clang::DependentDiagnostic::getAccessBaseObjectType(), clang::TemplateArgument::getAsType(), clang::serialization::UnsafeQualTypeDenseMapInfo::getEmptyKey(), 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::TemplateArgument::getNullPtrType(), clang::TemplateArgument::getParamTypeForDecl(), clang::ObjCMessageExpr::getSuperType(), clang::serialization::UnsafeQualTypeDenseMapInfo::getTombstoneKey(), clang::StandardConversionSequence::getToType(), clang::AmbiguousConversionSequence::getToType(), clang::BadConversionSequence::getToType(), clang::TypeLoc::getType(), and clang::TypeLoc::getTypePtr().
|
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 745 of file Type.h.
Referenced by clang::Sema::CheckOverridingFunctionReturnType(), diagnoseRedundantReturnTypeQualifiers(), and clang::CanQual< ObjCObjectType >::getCVRQualifiers().
|
inline |
Definition at line 646 of file Type.h.
Referenced by clang::serialization::UnsafeQualTypeDenseMapInfo::getHashValue(), clang::ASTWriter::GetOrCreateTypeID(), clang::ASTWriter::getTypeID(), clang::serialization::MakeTypeID(), and clang::QualifierCollector::strip().
|
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 5508 of file Type.h.
References clang::Qualifiers::addFastQualifiers().
Referenced by clang::Sema::ActOnForEachDeclStmt(), BuildSimilarlyQualifiedPointerType(), GetCompletionTypeString(), clang::TypeName::getFullyQualifiedType(), clang::CanQual< ObjCObjectType >::getQualifiers(), HasExplicitOwnershipAttr(), clang::ASTImporter::Import(), isConstantEmittableObjectType(), IsStandardConversion(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), UnwrapTypeForDebugInfo(), and clang::ASTTypeWriter::Visit().
|
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 849 of file Type.h.
Referenced by clang::Sema::AttachBaseSpecifiers(), BuildSimilarlyQualifiedPointerType(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckExceptionSpecSubset(), DiagnoseNarrowingInInitList(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), IsStandardConversion(), TryObjectArgumentInitialization(), and clang::ASTTypeWriter::Visit().
| QualType QualType::getNonLValueExprType | ( | const 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 2618 of file Type.cpp.
References clang::ASTContext::getLangOpts(), clang::Type::getPointeeType(), getTypePtr(), getUnqualifiedType(), clang::Type::isDependentType(), and clang::Type::isRecordType().
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXMemberCallExpr(), clang::Sema::BuildLiteralOperatorCall(), clang::Sema::BuildOverloadedArrowExpr(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckTemplateArgument(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), clang::FunctionType::getCallResultType(), clang::ObjCMethodDecl::getSendResultType(), clang::InitializationSequence::Perform(), PerformConstructorInitialization(), clang::Sema::PerformImplicitConversion(), TryClassUnification(), tryObjCWritebackConversion(), and TryRefInitWithConversionFunction().
|
inline |
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 5662 of file Type.h.
References clang::Type::getAs(), and clang::Type::getPointeeType().
Referenced by ActOnOMPReductionKindClause(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPIdExpression(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), clang::Sema::ActOnParamDefaultArgumentError(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::AddConversionCandidate(), AddObjCKeyValueCompletions(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCallToObjectOfClassType(), buildCapture(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildDeclarationNameExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), buildPromiseCall(), captureInBlock(), captureInLambda(), castToBase(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckConditionVariable(), CheckMapConflicts(), clang::Sema::CheckOpenMPLinearDecl(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), clang::Sema::CodeCompleteExpression(), CompleteNonViableCandidate(), createObjCPropertyGetter(), createPrivatesRecordDecl(), clang::Sema::DeduceAutoType(), DeduceNonTypeTemplateArgument(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::InitializationSequence::Diagnose(), diagnoseAmbiguousConversion(), clang::Sema::diagnoseARCUnbridgedCast(), DiagnoseBadConversion(), DiagnoseForRangeReferenceVariableCopies(), diagnoseNoViableConversion(), clang::Sema::DiagnosePropertyAccessorMismatch(), DiagnoseUninitializedReference(), emitBadConversionNotes(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), EmitOMPAtomicCaptureExpr(), EmitOMPAtomicReadExpr(), emitOutlinedFunctionPrologue(), clang::Sema::EmitRelatedResultTypeNote(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), FindConversionForRefInit(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), getCanonicalParamType(), clang::CFGImplicitDtor::getDestructorDecl(), clang::UnresolvedMemberExpr::getNamingClass(), clang::Sema::getOpenMPCapturedExpr(), getParamType(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), HandleConstructorCall(), clang::Sema::HandleFunctionTypeMismatch(), hasCopyOrMoveCtorParam(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), IsAcceptableNonMemberOperatorCandidate(), isAllowableExplicitConversion(), isFirstArgumentCompatibleWithType(), IsTypeModifiable(), clang::Sema::isValidPointerAttrType(), isVariableAlreadyCapturedInScopeInfo(), loadToBegin(), clang::InitializationSequence::Perform(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformImplicitConversion(), clang::APValue::printPretty(), recordConversion(), and clang::Sema::tryCaptureVariable().
|
inline |
Returns gc attribute of this type.
Return the gc attribute of this type.
Definition at line 5610 of file Type.h.
Referenced by clang::ASTContext::getObjCGCAttrKind(), clang::ASTContext::getObjCGCQualType(), and handleObjCGCTypeAttr().
|
inline |
Returns lifetime attribute of this type.
Definition at line 1028 of file Type.h.
Referenced by clang::Sema::ActOnPropertyImplDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildCXXNew(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildPseudoDestructorExpr(), captureInBlock(), captureInLambda(), checkAllAtProps(), clang::Sema::CheckAllocatedType(), checkARCPropertyImpl(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), clang::Sema::CheckObjCConversion(), clang::Sema::CheckParameter(), clang::Sema::CheckTemplateTypeArgument(), checkTrivialClassMembers(), clang::Sema::checkUnsafeAssigns(), clang::Sema::checkUnsafeExprAssigns(), computeBlockInfo(), considerVariable(), deducePropertyOwnershipFromType(), clang::Sema::DefaultLvalueConversion(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), EmitObjectDelete(), enterBlockScope(), EvaluateUnaryTypeTrait(), findRetainCycleOwner(), clang::ASTContext::getByrefLifetime(), GetGCAttrTypeForType(), clang::ASTContext::getInnerObjCOwnership(), clang::ASTContext::getLifetimeQualifiedType(), clang::Sema::HandlePropertyInClassExtension(), hasWeakMember(), inferARCLifetimeForPointee(), inferARCWriteback(), clang::Sema::inferObjCARCLifetime(), isCanonicalResultType(), isInvalidICRSource(), isNonWeakInMRRWithObjCWeak(), clang::Sema::LookupInObjCMethod(), LookupMemberExpr(), PropertyMemoryAttribute(), pushTemporaryCleanup(), clang::TreeTransform< Derived >::RebuildQualifiedType(), setImpliedPropertyAttributeForReadOnlyProperty(), shouldExtendReceiverForInnerPointerMessage(), transferARCOwnershipToDeclSpec(), tryEmitARCCopyWeakInit(), and tryEmitARCRetainLoadOfScalar().
|
inline |
Retrieve the set of qualifiers applied to this type.
Definition at line 5516 of file Type.h.
References clang::Qualifiers::addFastQualifiers().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::actOnObjCTypeParam(), AddRecordMembersCompletionResults(), AdoptQualifiers(), applyObjCTypeArgs(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildFieldReferenceExpr(), BuildImplicitBaseInitializer(), BuildSimilarlyQualifiedPointerType(), clang::Sema::CheckAllocatedType(), checkComplexDecomposition(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), checkMemberDecomposition(), CheckOriginalCallArgDeduction(), checkVectorDecomposition(), computeCopyInfoForBlockCapture(), computeDestroyInfoForBlockCapture(), clang::CodeGen::CodeGenFunction::CreateAggTemp(), createPlaceholderSlot(), decomposeTypeForEH(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::deduceVarTypeFromInitializer(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::InitializationSequence::Diagnose(), clang::Sema::DiagnoseAssignmentResult(), clang::CodeGen::CodeGenFunction::EmitAnyExprToExn(), clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), emitInitWithReductionInitializer(), clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), EmitOMPAggregateInit(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::emitThreadPrivateVarDefinition(), EmitValToTemp(), clang::Sema::FindCompositeObjCPointerType(), GetAlignOfType(), clang::ASTContext::getDeclAlign(), clang::TypeName::getFullyQualifiedType(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::ASTContext::getTargetAddressSpace(), clang::ASTContext::getUnqualifiedObjCPointerType(), clang::Sema::HandleField(), handleObjCOwnershipTypeAttr(), hasDirectOwnershipQualifier(), hasInconsistentOrSupersetQualifiersOf(), hasMangledSubstitutionQualifiers(), clang::PointerType::isAddressSpaceOverlapping(), isAtLeastAsQualifiedAs(), IsConstNonVolatile(), isMoreQualifiedThan(), clang::Expr::isNullPointerConstant(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsQualificationConversion(), isValidSwiftErrorResultType(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeGlobalReg(), clang::CodeGen::LValue::MakeVectorElt(), clang::ASTContext::mergeTypes(), clang::InitializationSequence::Perform(), clang::Sema::PerformObjectArgumentInitialization(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::Sema::RefersToMemberWithReducedAlignment(), rewriteBuiltinFunctionDecl(), rewriteToObjCProperty(), StoreAnyExprIntoOneUnit(), suppressReport(), TryReferenceInit(), TryRefInitWithConversionFunction(), TryStaticCast(), and TypeInfoIsInStandardLibrary().
|
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 923 of file Type.h.
Referenced by captureVariablyModifiedType(), computeConditionalNullability(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), and clang::Type::getNullability().
|
inline |
Definition at line 914 of file Type.h.
Referenced by clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), and clang::ASTContext::getVariableArrayDecayedType().
|
inline |
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 sugar for an array type. To strip qualifiers even from within a sugared array type, use ASTContext::getUnqualifiedArrayType.
Definition at line 5576 of file Type.h.
References clang::Type::getCanonicalTypeInternal().
Referenced by clang::Sema::BuildQualifiedType(), and clang::ASTContext::getUnqualifiedArrayType().
|
inline |
Retrieves a pointer to the underlying (unqualified) type.
This function requires that the type not be NULL. If the type might be NULL, use the (slightly less efficient) getTypePtrOrNull().
Definition at line 5489 of file Type.h.
Referenced by clang::Sema::ActOnCastExpr(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), addAssociatedClassesAndNamespaces(), clang::ASTContext::adjustFunctionType(), clang::ASTContext::applyObjCProtocolQualifiers(), applyObjCTypeArgs(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildMemberPointerType(), buildSingleCopyAssignRecursively(), clang::Type::canHaveNullability(), captureVariablyModifiedType(), clang::Sema::CheckAddressOfOperand(), CheckArrayExpressionDoesNotReferToUnitySize(), CheckArrayExpressionDoesNotReferToWholeSize(), checkIsValidOpenCLKernelParameter(), clang::Sema::checkNullabilityTypeSpecifier(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), clang::Sema::CheckObjCConversion(), clang::Sema::checkOpenCLDisabledTypeDeclSpec(), clang::EnumDecl::completeDefinition(), computeLinkageInfo(), clang::CodeGen::CodeGenTypes::ConvertFunctionType(), clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::ObjCTypeParamDecl::Create(), clang::TemplateTypeParmDecl::Create(), clang::CanQual< T >::CreateUnsafe(), clang::Sema::DeduceTemplateArguments(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::TypePropertyCache< Private >::ensure(), FindVA(), clang::Sema::FixOverloadedFunctionReference(), GetAlignOfType(), getAtomicUnqualifiedType(), getBaseTypeIdentifier(), clang::ASTContext::getCanonicalNestedNameSpecifier(), clang::ASTContext::getCanonicalParamType(), clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), getCurrentInstantiationOf(), clang::ASTContext::getDeclAlign(), clang::TypeName::getFullyQualifiedTemplateType(), clang::TypeName::getFullyQualifiedType(), getIntegerTypeForEnum(), clang::ASTContext::getLegacyIntegralTypeEncoding(), clang::Sema::getMessageSendResultType(), getNonLValueExprType(), clang::Type::getNullability(), clang::Type::getPointeeOrArrayElementType(), clang::ASTContext::getPreferredTypeAlign(), getRequiredQualification(), GetSignature(), llvm::simplify_type< ::clang::QualType >::getSimplifiedValue(), getTypeAlignIfRequired(), clang::ASTContext::getTypeInfo(), clang::ASTContext::getTypeInfoInChars(), clang::CanQual< ObjCObjectType >::getTypePtr(), clang::TypeLoc::getTypePtr(), clang::ASTContext::getUnqualifiedObjCPointerType(), getUuidAttrOfType(), HandleOpenCLAccessAttr(), hasAnyVptr(), clang::ASTImporter::Import(), clang::ASTContext::isAlignmentRequired(), isCXX11PODType(), isCXX98PODType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::IsMemberPointerConversion(), clang::Type::isObjCARCImplicitlyUnretainedType(), clang::Type::isObjCInertUnsafeUnretainedType(), clang::Sema::IsOverload(), isSafeToConvert(), isSingleElementStruct(), clang::ASTImporter::IsStructurallyEquivalent(), isTrivialType(), IsVoidStarType(), lookupPromiseType(), clang::serialization::MakeTypeID(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mergeObjCGCQualifiers(), clang::Sema::MergeTypedefNameDecl(), clang::ASTContext::mergeTypes(), clang::StmtIteratorBase::NextVA(), ObjCBridgeRelatedAttrFromType(), clang::InitializationSequence::Perform(), print_elem(), printIntegral(), clang::CodeGen::CodeGenTypes::RefreshTypeCacheForClass(), clang::Sema::setOpenCLExtensionForType(), clang::AttributedType::stripOuterNullability(), TypeIsInnerPointer(), UnwrapTypeForDebugInfo(), clang::CodeGen::CodeGenTypes::UpdateCompletedType(), clang::ASTNodeImporter::VisitMemberPointerType(), and clang::ASTNodeImporter::VisitSubstTemplateTypeParmType().
|
inline |
Definition at line 5493 of file Type.h.
Referenced by clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::CheckOpenMPLinearDecl(), clang::ento::TypedValueRegion::getDesugaredValueType(), clang::CanQual< ObjCObjectType >::getTypePtrOrNull(), clang::ento::MemRegionManager::getVarRegion(), isThrowCaught(), clang::ASTReader::ReadNestedNameSpecifier(), and clang::EnumDecl::setIntegerType().
|
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:
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 sugar for an array type. To strip qualifiers even from within a sugared array type, use ASTContext::getUnqualifiedArrayType.
Definition at line 5569 of file Type.h.
References clang::Type::getCanonicalTypeInternal(), and clang::ExtQualsTypeCommonBase::QualType.
Referenced by clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCXXDelete(), clang::Sema::actOnObjCTypeParam(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), clang::Sema::ActOnStmtExpr(), clang::Sema::AddConversionCandidate(), AdjustFunctionParmAndArgTypesForDeduction(), AdoptQualifiers(), applyObjCTypeArgs(), buildCoawaitCalls(), clang::Sema::BuildDeclarationNameExpr(), buildDeclareReductionRef(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildImplicitBaseInitializer(), BuildSimilarlyQualifiedPointerType(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), captureInCapturedRegion(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckAssignmentOperands(), checkBlockPointerTypesForAssignment(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), checkConditionalPointerCompatibility(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckOpenMPLinearDecl(), CheckOriginalCallArgDeduction(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), checkTrivialSubobjectCall(), clang::Sema::CheckVectorOperands(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), decomposeTypeForEH(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DiagnoseAssignmentEnum(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseBadFunctionCast(), DiagnoseCastOfObjCSEL(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), EvaluateBinaryTypeTrait(), extractPBaseFlags(), FindConversionForRefInit(), FormatFunctionParameter(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), GenOpenCLArgMetadata(), getAtomicUnqualifiedType(), clang::ASTContext::getExceptionObjectType(), clang::EnumDecl::getIntegerType(), getNonLValueExprType(), clang::ASTContext::getSignatureParameterType(), clang::CXXBaseSpecifier::getType(), clang::ASTContext::getUnqualifiedObjCPointerType(), clang::InitializedEntity::InitializeParameter(), clang::Sema::IsBlockPointerConversion(), clang::Sema::isInitListConstructor(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::isObjCWritebackConversion(), clang::Sema::IsQualificationConversion(), clang::ento::cocoa::isRefType(), IsStandardConversion(), IsVoidStarType(), maybeAdjustInterfaceForSubscriptingCheck(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeTypes(), OpenCLConvertScalarsToVectors(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformImplicitConversion(), clang::TreeTransform< Derived >::RebuildQualifiedType(), ResolveOverloadedFunctionForReferenceBinding(), rewriteToObjCProperty(), SemaOpenCLBuiltinEnqueueKernel(), clang::Sema::tryCaptureVariable(), tryGCCVectorConvertAndSplat(), TryLValueToRValueCast(), TryRefInitWithConversionFunction(), TryStaticDowncast(), TryUserDefinedConversion(), and TypeIsInnerPointer().
|
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 730 of file Type.h.
Referenced by clang::serialization::MakeTypeID(), clang::QualifierCollector::strip(), and clang::ASTTypeWriter::Visit().
|
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 720 of file Type.h.
Referenced by clang::ASTContext::getAsArrayType(), clang::ASTContext::getConstantArrayType(), clang::TypeName::getFullyQualifiedType(), clang::ASTContext::getIncompleteArrayType(), clang::ASTContext::getVariableArrayType(), clang::CanQual< ObjCObjectType >::hasQualifiers(), clang::serialization::MakeTypeID(), and clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc().
|
inline |
Definition at line 1032 of file Type.h.
Referenced by clang::Sema::ActOnFields(), BuildImplicitMemberInitializer(), checkTrivialClassMembers(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), isCXX11PODType(), isCXX98PODType(), isTriviallyCopyableType(), and isTrivialType().
|
inline |
Determine whether this type has any qualifiers.
Definition at line 5564 of file Type.h.
Referenced by clang::Sema::actOnObjCTypeParam(), clang::InitializationSequence::AddLValueToRValueStep(), AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildAtomicType(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckTemplateArgument(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::DefaultLvalueConversion(), clang::Sema::IsBlockPointerConversion(), isTemplateArgumentTemplateParameter(), clang::ASTContext::mergeFunctionTypes(), and TryUserDefinedConversion().
|
inline |
Definition at line 1036 of file Type.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr().
|
inline |
Returns the specified type after dropping any outer-level parentheses.
Definition at line 929 of file Type.h.
Referenced by checkQualifiedFunction(), and clang::Sema::hasExplicitCallingConv().
Determine whether this type is at least as qualified as the other given type, requiring exact equality for non-CVR qualifiers.
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 5643 of file Type.h.
References getQualifiers(), clang::Type::isVoidType(), and clang::Qualifiers::removeUnaligned().
Referenced by checkObjCPointerTypesForAssignment(), clang::CanQual< ObjCObjectType >::isAtLeastAsQualifiedAs(), clang::Sema::isObjCPointerConversion(), TryClassUnification(), and TryObjectArgumentInitialization().
|
inline |
Definition at line 5533 of file Type.h.
Referenced by checkBlockPointerTypesForAssignment(), checkObjCPointerTypesForAssignment(), checkPointerTypesForAssignment(), clang::Sema::CheckTemplateIdType(), clang::CodeGen::CodeGenTypes::ConvertFunctionType(), clang::CanQual< T >::CreateUnsafe(), DeduceTemplateArguments(), GenOpenCLArgMetadata(), clang::ASTContext::getAtomicType(), clang::ASTContext::getBlockPointerType(), clang::ASTContext::getComplexType(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getElaboratedType(), clang::ASTContext::getExtVectorType(), clang::CanQual< T >::getFromOpaquePtr(), 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(), isCanonicalExceptionSpecification(), isCanonicalResultType(), isConstantEmittableObjectType(), and clang::Sema::MergeFunctionDecl().
|
inline |
Definition at line 5537 of file Type.h.
References clang::Type::hasSizedVLAType(), and clang::Type::isVariablyModifiedType().
Referenced by clang::CanQual< ObjCObjectType >::isCanonicalAsParam().
|
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 5669 of file Type.h.
References clang::Type::isFunctionType(), and clang::Type::isVoidType().
Referenced by CheckIndirectionOperand(), clang::Sema::CreateBuiltinArraySubscriptExpr(), and clang::ento::ExprEngine::VisitLvalArraySubscriptExpr().
|
inline |
Definition at line 753 of file Type.h.
Referenced by ActOnOMPReductionKindClause(), checkFormatStringExpr(), clang::Sema::CheckOpenMPLinearDecl(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenModule::isTypeConstant(), and ReportOriginalDSA().
|
inline |
Determine whether this type is const-qualified.
Definition at line 5548 of file Type.h.
Referenced by clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddInitializerToDecl(), appendQualifier(), BuildImplicitMemberInitializer(), buildSingleCopyAssign(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFieldDecl(), CheckForModifiableLvalue(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckParameter(), clang::Sema::CheckVariableDeclarationType(), decomposeTypeForEH(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), DiagnoseForRangeVariableCopies(), enterBlockScope(), evaluateLValueAsAllocSize(), EvaluateUnaryTypeTrait(), extractPBaseFlags(), findCompleteObject(), findSubobject(), GenOpenCLArgMetadata(), clang::ento::MemRegionManager::getVarRegion(), clang::consumed::ConsumedStmtVisitor::handleCall(), inferARCLifetimeForPointee(), isPointerToConst(), isReferenceToNonConstCapture(), IsTypeModifiable(), isVoidPointerToNonConst(), clang::analyze_format_string::ArgType::matchesType(), ShouldDiagnoseSwitchCaseNotInEnum(), tryCaptureAsConstant(), TryConstructorInitialization(), tryEmitARCRetainLoadOfScalar(), TryListConversion(), TryReferenceInit(), and clang::ento::UndefOrNullArgVisitor::VisitNode().
| bool QualType::isCXX11PODType | ( | const ASTContext & | Context | ) | const |
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 2257 of file Type.cpp.
References clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), getTypePtr(), hasNonTrivialObjCLifetime(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isScalarType(), and clang::Type::isVectorType().
Referenced by isPODType().
| bool QualType::isCXX98PODType | ( | const ASTContext & | Context | ) | const |
Return true if this is a POD type according to the rules of the C++98 standard, regardless of the current compilation's language.
Definition at line 2013 of file Type.cpp.
References clang::ASTContext::getBaseElementType(), clang::Type::getTypeClass(), getTypePtr(), hasNonTrivialObjCLifetime(), isCXX98PODType(), and isNull().
Referenced by isCXX98PODType(), isPODType(), and clang::Sema::isValidVarArgType().
|
inline |
Returns a nonzero value 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 1054 of file Type.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFields(), clang::Sema::CheckCompleteVariableDeclaration(), clang::ASTContext::DeclMustBeEmitted(), clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups(), emitCXXDestructMethod(), EmitDeclDestroy(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::emitThreadPrivateVarDefinition(), enterBlockScope(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), EvaluateUnaryTypeTrait(), clang::InitializationSequence::Perform(), and clang::CodeGen::CGCXXABI::requiresArrayCookie().
|
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 690 of file Type.h.
References clang::Qualifiers::Const.
Referenced by clang::CanQual< ObjCObjectType >::isConstQualified().
|
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 700 of file Type.h.
References clang::Qualifiers::Restrict.
Referenced by clang::CanQual< ObjCObjectType >::isRestrictQualified().
|
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 710 of file Type.h.
References clang::Qualifiers::Volatile.
Referenced by clang::CanQual< ObjCObjectType >::isVolatileQualified().
Determine whether this type is more qualified than the other given type, requiring exact equality for non-CVR qualifiers.
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 5633 of file Type.h.
References clang::Qualifiers::compatiblyIncludes(), and getQualifiers().
Referenced by buildDeclareReductionRef(), clang::Sema::CheckOverridingFunctionReturnType(), CompareQualificationConversions(), CompareStandardConversionSequences(), and clang::CanQual< ObjCObjectType >::isMoreQualifiedThan().
| bool QualType::isNonWeakInMRRWithObjCWeak | ( | const ASTContext & | Context | ) | const |
Definition at line 2148 of file Type.cpp.
References clang::ASTContext::getLangOpts(), getObjCLifetime(), and clang::Qualifiers::OCL_Weak.
Referenced by clang::Sema::AddInitializerToDecl(), and clang::Sema::CheckAssignmentOperands().
|
inline |
Return true if this QualType doesn't point to a type yet.
Definition at line 683 of file Type.h.
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnBuiltinOffsetOf(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnClassMessage(), clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXNestedNameSpecifier(), clang::Sema::ActOnCXXThis(), clang::Sema::ActOnCXXTypeid(), clang::Sema::ActOnCXXUuidof(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(), clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateIdType(), clang::Sema::ActOnTypenameType(), AddClassMessageCompletions(), addInstantiatedParametersToScope(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddModeAttr(), AddObjCKeyValueCompletions(), AddOrdinaryNameResults(), clang::ODRHash::AddQualType(), AddResultTypeChunk(), addThisCompletion(), clang::Sema::adjustCCAndNoReturn(), AdjustFunctionParmAndArgTypesForDeduction(), clang::TreeTransform< Derived >::AlreadyTransformed(), clang::ASTContext::areCommonBaseCompatible(), clang::ento::ProgramState::assumeInBound(), clang::ento::StoreManager::attemptDownCast(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildClassMessageImplicit(), buildCoroutineHandle(), clang::Sema::buildCoroutinePromise(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::BuildImplicitMemberExpr(), clang::Sema::BuildInstanceMessage(), clang::Sema::buildLambdaInitCaptureInitialization(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildObjCObjectType(), clang::Sema::BuildObjCStringLiteral(), clang::Sema::BuildObjCTypeParamType(), clang::Sema::BuildQualifiedType(), clang::Sema::BuildReturnStmt(), BuildSimilarlyQualifiedPointerType(), clang::Sema::BuildUnaryTransformType(), clang::Sema::BuildVAArgExpr(), clang::arcmt::trans::canApplyWeak(), clang::Sema::canDelayFunctionBody(), clang::Sema::canThrow(), captureVariablyModifiedType(), CastForMoving(), clang::ento::StoreManager::CastRetrievedVal(), clang::Sema::CheckAdditionOperands(), checkAllAtProps(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckConditionalOperands(), checkConditionalPointerCompatibility(), checkDeducedTemplateArguments(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckFieldDecl(), CheckIndirectionOperand(), clang::Sema::checkInitMethod(), CheckKeyForObjCARCConversion(), CheckMapConflicts(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckNonDependentConversions(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateIdType(), checkTupleLikeDecomposition(), clang::Sema::checkUnsafeExprAssigns(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorLogicalOperands(), checkWeakGCAttrs(), ClassifyImplicitMemberAccess(), clang::Sema::CodeCompleteCall(), clang::Sema::CodeCompleteDeclSpec(), clang::Sema::CodeCompleteExpression(), clang::Sema::CodeCompleteObjCClassMessage(), clang::Sema::CodeCompleteObjCInstanceMessage(), clang::Sema::CodeCompleteObjCMethodDecl(), CodeCompleteOverloadResults(), clang::Sema::CodeCompleteReturn(), clang::Sema::containsUnexpandedParameterPacks(), ConvertTypeToDiagnosticString(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::CanQual< T >::CreateUnsafe(), clang::Sema::CXXCheckConditionalOperands(), DecodeTypeFromStr(), decomposeTypeForEH(), clang::Sema::DeduceAutoType(), clang::Sema::deduceClosureReturnType(), clang::DeducedType::DeducedType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DeduceVariableDeclarationType(), clang::Sema::deduceVarTypeFromInitializer(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), determineEndOffset(), clang::CodeGen::emitDoacrossInit(), clang::CodeGen::emitTaskCall(), clang::CodeGen::emitTaskInit(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), errorForGCAttrsOnNonObjC(), EvaluateAsRValue(), evaluateCDTSize(), FastEvaluateAsRValue(), FindDesignatorMismatch(), FindImplementableMethods(), clang::Sema::FindInstantiatedDecl(), FinishForRangeVarDecl(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ASTContext::getAutoDeductType(), clang::ASTContext::getAutoRRefDeductType(), clang::ASTContext::getAutoType(), clang::ASTContext::getCommentForDecl(), getCurrentInstantiationOf(), clang::Sema::getCurrentThisType(), GetDeclSpecTypeForDeclarator(), getDecltypeForExpr(), clang::ASTContext::getDependentNameType(), clang::Sema::getDestructorName(), clang::Sema::getElaboratedType(), clang::ento::StoreManager::GetElementZeroRegion(), getExistingLazyBinding(), GetFullTypeForDeclarator(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ASTContext::getInnerObjCOwnership(), clang::TypeLoc::getLocalAlignmentForType(), getMostInformativeDerivedClassImpl(), clang::Sema::getMostSpecialized(), clang::Sema::GetNameFromUnqualifiedId(), clang::NSAPI::GetNSIntegralKind(), getNSNumberFactoryMethod(), clang::ASTContext::getObjCClassRedefinitionType(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::ASTContext::getObjCIdRedefinitionType(), clang::ASTContext::getObjCSelRedefinitionType(), clang::ASTContext::getObjCSuperType(), clang::ASTContext::getObjCTypeParamType(), clang::CodeGen::CGDebugInfo::getOrCreateStandaloneType(), clang::ASTWriter::GetOrCreateTypeID(), getParamType(), getPreferredArgumentTypeForMessageSend(), getPrivateItem(), clang::ASTContext::getPromotedIntegerType(), clang::CXXInstanceCall::getRuntimeDefinition(), clang::ObjCMethodCall::getRuntimeDefinition(), clang::ObjCObjectPointerType::getSuperClassType(), clang::ento::ProgramState::getSVal(), clang::ASTContext::getTemplateSpecializationType(), clang::CodeGen::getTgtBinaryDescriptorQTy(), clang::CodeGen::getTgtDeviceImageQTy(), clang::CodeGen::getTgtOffloadEntryQTy(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::ASTReader::GetType(), clang::ASTContext::getTypedefType(), clang::Sema::GetTypeFromParser(), clang::ASTWriter::getTypeID(), clang::Sema::getTypeName(), clang::ASTReader::GetTypeSourceInfo(), clang::ento::MemRegionManager::getVarRegion(), HandleExtVectorTypeAttr(), clang::Sema::HandleFunctionTypeMismatch(), handleNSReturnsRetainedAttr(), HelperIsMethodInObjCType(), clang::ASTImporter::Import(), clang::ASTNodeImporter::ImportDefinition(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::ASTReader::InitializeContext(), clang::InitializationSequence::InitializeFrom(), IsAcceptableNonMemberOperatorCandidate(), isCharSpecialization(), isCharType(), clang::Sema::isCopyElisionCandidate(), isCXX98PODType(), clang::Declarator::isDeclarationOfFunction(), clang::DeclarationName::isDependentName(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::Sema::isNonTypeNestedNameSpecifier(), clang::CanQual< ObjCObjectType >::isNull(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Sema::isThisOutsideMemberFunctionBody(), isTrivialType(), clang::ento::DynamicTypeInfo::isValid(), clang::ento::SymExpr::isValidTypeForSymbol(), clang::Sema::LazilyCreateBuiltin(), lookupCoroutineHandleType(), LookupMemberExpr(), lookupPromiseType(), lookupStdTypeTraitMember(), clang::Sema::LookupTemplateName(), clang::serialization::MakeTypeID(), MarkUsedTemplateParameters(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), maybeAdjustInterfaceForSubscriptingCheck(), clang::Sema::MergeCompatibleFunctionDecls(), mergeEnumWithInteger(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeFunctionParameterTypes(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTransparentUnionType(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclTypes(), OpenCLCheckVectorConditional(), OpenCLConvertScalarsToVectors(), clang::Sema::ParseObjCProtocolExpression(), clang::Sema::ParseTypedefDecl(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformImplicitConversion(), clang::APValue::printPretty(), clang::ento::ExprEngine::processCallExit(), RebuildDeclaratorInCurrentInstantiation(), clang::TreeTransform< Derived >::RebuildDependentNameType(), clang::TreeTransform< Derived >::RebuildDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), recoverFromMSUnqualifiedLookup(), ResolveOverloadForDeduction(), rewriteToNSMacroDecl(), clang::Sema::SelectorsForTypoCorrection(), clang::InitializationSequence::SetFailed(), clang::ASTContext::setObjCConstantStringInterface(), clang::Expr::setType(), shouldNotPrintDirectly(), clang::Sema::SubstFunctionDeclType(), clang::Sema::SubstituteExplicitTemplateArguments(), substObjCTypeArgs(), clang::Sema::SubstType(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformExceptionSpec(), clang::TreeTransform< Derived >::TransformFunctionProtoType(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformFunctionTypeParams(), clang::TreeTransform< Derived >::TransformReferenceType(), clang::TreeTransform< Derived >::TransformTemplateName(), clang::TreeTransform< Derived >::TransformType(), clang::RecursiveASTVisitor< Derived >::TraverseType(), treatUnusedNewEscaped(), clang::Sema::tryExprAsCall(), TryListConversion(), TryToFixInvalidVariablyModifiedType(), TryToFixInvalidVariablyModifiedTypeSourceInfo(), clang::Sema::tryToRecoverWithCall(), clang::ASTContext::typesAreBlockPointerCompatible(), clang::ASTContext::typesAreCompatible(), UnwrapTypeForDebugInfo(), clang::Sema::UsualArithmeticConversions(), clang::Sema::UsualUnaryConversions(), clang::ASTNodeImporter::VisitAddrLabelExpr(), clang::ASTNodeImporter::VisitArrayInitIndexExpr(), clang::ASTNodeImporter::VisitArrayInitLoopExpr(), clang::ASTNodeImporter::VisitArraySubscriptExpr(), clang::ASTNodeImporter::VisitArrayTypeTraitExpr(), clang::ASTNodeImporter::VisitAtomicExpr(), clang::ASTNodeImporter::VisitAtomicType(), clang::ASTNodeImporter::VisitAttributedType(), clang::ASTNodeImporter::VisitAutoType(), clang::ASTNodeImporter::VisitBinaryConditionalOperator(), clang::ASTNodeImporter::VisitBinaryOperator(), clang::ASTNodeImporter::VisitBlockPointerType(), clang::ASTNodeImporter::VisitCallExpr(), clang::ASTNodeImporter::VisitCharacterLiteral(), clang::ASTNodeImporter::VisitClassTemplateSpecializationDecl(), clang::ASTNodeImporter::VisitComplexType(), clang::ASTNodeImporter::VisitCompoundAssignOperator(), clang::ASTNodeImporter::VisitCompoundLiteralExpr(), clang::ASTNodeImporter::VisitConditionalOperator(), clang::ASTNodeImporter::VisitConstantArrayType(), clang::ASTNodeImporter::VisitCXXBoolLiteralExpr(), clang::ASTNodeImporter::VisitCXXConstructExpr(), clang::ASTNodeImporter::VisitCXXDeleteExpr(), clang::ASTNodeImporter::VisitCXXMemberCallExpr(), clang::ASTNodeImporter::VisitCXXNamedCastExpr(), clang::ASTNodeImporter::VisitCXXNewExpr(), clang::ASTNodeImporter::VisitCXXNoexceptExpr(), clang::ASTNodeImporter::VisitCXXNullPtrLiteralExpr(), clang::ASTNodeImporter::VisitCXXScalarValueInitExpr(), clang::ASTNodeImporter::VisitCXXTemporaryObjectExpr(), clang::ASTNodeImporter::VisitCXXThisExpr(), clang::ASTNodeImporter::VisitCXXThrowExpr(), clang::ASTNodeImporter::VisitDecayedType(), clang::ASTNodeImporter::VisitDeclRefExpr(), clang::ASTNodeImporter::VisitDecltypeType(), clang::ASTNodeImporter::VisitElaboratedType(), clang::ASTNodeImporter::VisitEnumConstantDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTNodeImporter::VisitExplicitCastExpr(), clang::ASTNodeImporter::VisitExpressionTraitExpr(), clang::ASTNodeImporter::VisitExtVectorType(), clang::ASTNodeImporter::VisitFieldDecl(), clang::ASTNodeImporter::VisitFloatingLiteral(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::ASTNodeImporter::VisitFunctionNoProtoType(), clang::ASTNodeImporter::VisitFunctionProtoType(), clang::ASTNodeImporter::VisitGNUNullExpr(), clang::ASTNodeImporter::VisitImplicitCastExpr(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::ASTNodeImporter::VisitImplicitValueInitExpr(), clang::ASTNodeImporter::VisitIncompleteArrayType(), clang::ASTNodeImporter::VisitIndirectFieldDecl(), clang::ASTNodeImporter::VisitInitListExpr(), clang::ASTNodeImporter::VisitInjectedClassNameType(), clang::ASTNodeImporter::VisitIntegerLiteral(), clang::ASTNodeImporter::VisitLValueReferenceType(), clang::ASTNodeImporter::VisitMaterializeTemporaryExpr(), clang::ASTNodeImporter::VisitMemberExpr(), clang::ASTNodeImporter::VisitMemberPointerType(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCMethodDecl(), clang::ASTNodeImporter::VisitObjCObjectPointerType(), clang::ASTNodeImporter::VisitObjCObjectType(), clang::ASTNodeImporter::VisitOffsetOfExpr(), clang::ASTNodeImporter::VisitOpaqueValueExpr(), clang::ASTNodeImporter::VisitParenType(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTNodeImporter::VisitPointerType(), clang::ASTNodeImporter::VisitPredefinedExpr(), clang::ASTNodeImporter::VisitRValueReferenceType(), clang::ASTNodeImporter::VisitStmtExpr(), clang::ASTNodeImporter::VisitStringLiteral(), clang::ASTNodeImporter::VisitSubstNonTypeTemplateParmExpr(), clang::ASTNodeImporter::VisitSubstTemplateTypeParmType(), clang::ASTNodeImporter::VisitTemplateSpecializationType(), clang::ASTNodeImporter::VisitTypedefNameDecl(), clang::ASTNodeImporter::VisitTypeOfType(), clang::ASTNodeImporter::VisitUnaryOperator(), clang::ASTNodeImporter::VisitUnaryTransformType(), clang::ASTNodeImporter::VisitVAArgExpr(), clang::ASTNodeImporter::VisitVarDecl(), clang::ASTNodeImporter::VisitVariableArrayType(), clang::ASTNodeImporter::VisitVarTemplateDecl(), clang::ASTNodeImporter::VisitVarTemplateSpecializationDecl(), and clang::ASTNodeImporter::VisitVectorType().
|
inline |
true when Type is objc's strong.
Definition at line 1023 of file Type.h.
References clang::Qualifiers::getObjCGCAttr(), and clang::Qualifiers::Strong.
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnPropertyImplDecl(), and GetGCAttrTypeForType().
|
inline |
true when Type is objc's weak.
Definition at line 1018 of file Type.h.
References clang::Qualifiers::getObjCGCAttr(), and clang::Qualifiers::Weak.
Referenced by clang::Sema::ActOnPropertyImplDecl(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckVariableDeclarationType(), computeCopyInfoForBlockCapture(), computeDestroyInfoForBlockCapture(), deducePropertyOwnershipFromType(), clang::CodeGen::CodeGenFunction::emitByrefStructureInit(), and GetGCAttrTypeForType().
| bool QualType::isPODType | ( | const ASTContext & | Context | ) | const |
Determine whether this is a Plain Old Data (POD) type (C++ 3.9p10).
Definition at line 2005 of file Type.cpp.
References clang::ASTContext::getLangOpts(), isCXX11PODType(), and isCXX98PODType().
Referenced by clang::Sema::BuildVAArgExpr(), clang::Sema::CheckFunctionDeclaration(), DiagnoseForRangeConstVariableCopies(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), EmitMemberInitializer(), and EvaluateUnaryTypeTrait().
|
inline |
Determine whether this type is restrict-qualified.
Definition at line 5553 of file Type.h.
Referenced by appendQualifier(), CollectVRQualifiers(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), extractPBaseFlags(), and GenOpenCLArgMetadata().
| bool QualType::isTriviallyCopyableType | ( | const ASTContext & | Context | ) | const |
Return true if this is a trivially copyable type (C++0x [basic.types]p9)
Definition at line 2110 of file Type.cpp.
References clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getCanonicalType(), hasNonTrivialObjCLifetime(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::Type::isScalarType(), isTriviallyCopyableType(), and clang::Type::isVectorType().
Referenced by clang::Sema::BuildAtomicType(), buildSingleCopyAssign(), createObjCPropertyGetter(), EvaluateUnaryTypeTrait(), isTriviallyCopyableType(), and shouldUseUndefinedBehaviorReturnOptimization().
| bool QualType::isTrivialType | ( | const ASTContext & | Context | ) | const |
Return true if this is a trivial type per (C++0x [basic.types]p9)
Definition at line 2061 of file Type.cpp.
References clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getTypePtr(), hasNonTrivialObjCLifetime(), clang::Type::isDependentType(), isNull(), clang::Type::isScalarType(), isTrivialType(), and clang::Type::isVectorType().
Referenced by EvaluateUnaryTypeTrait(), and isTrivialType().
|
inline |
Determine whether this type is volatile-qualified.
Definition at line 5559 of file Type.h.
Referenced by clang::Sema::ActOnFields(), clang::Sema::AddInitializerToDecl(), appendQualifier(), buildSingleCopyAssign(), clang::Sema::CaptureHasSideEffects(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckLiteralOperatorDeclaration(), CollectVRQualifiers(), decomposeTypeForEH(), clang::InitializationSequence::Diagnose(), DiagnoseSelfAssignment(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), EvaluateUnaryTypeTrait(), extractPBaseFlags(), findCompleteObject(), findSubobject(), GenOpenCLArgMetadata(), handleLValueToRValueConversion(), clang::Expr::HasSideEffects(), clang::Sema::IgnoredValueConversions(), clang::Sema::isCopyElisionCandidate(), clang::Expr::isUnusedResultAWarning(), clang::AtomicExpr::isVolatile(), tryEmitARCRetainLoadOfScalar(), TryListConversion(), and TryReferenceInit().
|
inline |
Definition at line 952 of file Type.h.
References clang::Qualifiers::print().
Referenced by llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), clang::NestedNameSpecifier::print(), clang::ast_type_traits::DynTypedNode::print(), clang::TemplateArgument::print(), print_elem(), and clang::printCXXConstructorDestructorName().
|
inlinestatic |
Definition at line 957 of file Type.h.
References clang::Qualifiers::print(), clang::SplitQualType::Quals, and clang::SplitQualType::Ty.
|
static |
Definition at line 1740 of file TypePrinter.cpp.
|
inline |
Definition at line 1007 of file Type.h.
Referenced by clang::ento::CompoundValData::Profile(), clang::TemplateArgument::Profile(), clang::ParenType::Profile(), and clang::ElaboratedType::Profile().
|
inline |
Definition at line 5583 of file Type.h.
References clang::Qualifiers::Const.
Referenced by DiagnoseForRangeReferenceVariableCopies(), and findCompleteObject().
|
inline |
Definition at line 5595 of file Type.h.
References clang::Qualifiers::CVRMask, and clang::Qualifiers::FastMask.
Referenced by adjustCVQualifiersForCXXThisWithinLambda(), and captureThis().
|
inline |
Definition at line 817 of file Type.h.
Referenced by clang::serialization::MakeTypeID(), and withoutLocalFastQualifiers().
|
inline |
Definition at line 818 of file Type.h.
References clang::Qualifiers::FastMask.
|
inline |
Definition at line 5587 of file Type.h.
References clang::Qualifiers::Restrict.
|
inline |
Definition at line 5591 of file Type.h.
References clang::Qualifiers::Volatile.
|
inline |
|
inline |
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition at line 5497 of file Type.h.
References clang::Qualifiers::addFastQualifiers(), clang::Qualifiers::fromFastMask(), clang::ExtQuals::getBaseType(), and clang::ExtQuals::getQualifiers().
Referenced by clang::ODRHash::AddQualType(), checkARCPropertyImpl(), handleObjCOwnershipTypeAttr(), clang::CanQual< ObjCObjectType >::split(), stripObjCKindOfType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), and substObjCTypeArgs().
|
inline |
Definition at line 997 of file Type.h.
Referenced by clang::PredefinedExpr::ComputeName(), and clang::FunctionProtoType::printExceptionSpecification().
| QualType QualType::stripObjCKindOfType | ( | const ASTContext & | ctx | ) | const |
Strip Objective-C "__kindof" types from the given type.
Definition at line 1273 of file Type.cpp.
References clang::Type::getAs(), clang::ASTContext::getObjCObjectType(), clang::ASTContext::getQualifiedType(), clang::SplitQualType::Quals, split(), clang::SplitQualType::Ty, and clang::ast_matchers::type.
Referenced by clang::Sema::CodeCompleteObjCMethodDecl().
| QualType QualType::substObjCMemberType | ( | QualType | objectType, |
| const DeclContext * | dc, | ||
| ObjCSubstitutionContext | context | ||
| ) | const |
Substitute type arguments from an object type for the Objective-C type parameters used in the subject type.
This operation combines the computation of type arguments for substitution (Type::getObjCSubstitutions) with the actual process of substitution (QualType::substObjCTypeArgs) for the convenience of callers that need to perform a single substitution in isolation.
| objectType | The type of the object whose member type we're substituting into. For example, this might be the receiver of a message or the base of a property access. |
| dc | The declaration context from which the subject type was retrieved, which indicates (for example) which type parameters should be substituted. |
| context | The context in which the subject type was written. |
Definition at line 1264 of file Type.cpp.
References clang::Type::getObjCSubstitutions(), clang::DeclContext::getParentASTContext(), and substObjCTypeArgs().
Referenced by clang::ObjCMethodDecl::getSendResultType(), clang::ObjCPropertyDecl::getUsageType(), and clang::ObjCIvarDecl::getUsageType().
| QualType QualType::substObjCTypeArgs | ( | ASTContext & | ctx, |
| ArrayRef< QualType > | typeArgs, | ||
| ObjCSubstitutionContext | context | ||
| ) | const |
Substitute type arguments for the Objective-C type parameters used in the subject type.
Substitute the given type arguments for Objective-C type parameters within the given type, recursively.
| ctx | ASTContext in which the type exists. |
| typeArgs | The type arguments that will be substituted for the Objective-C type parameters in the subject type, which are generally computed via Type::getObjCSubstitutions. If empty, the type parameters will be replaced with their bounds or id/Class, as appropriate for the context. |
| context | The context in which the subject type was written. |
Definition at line 1074 of file Type.cpp.
References clang::ASTContext::applyObjCProtocolQualifiers(), clang::EST_Dynamic, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, getAsOpaquePtr(), clang::ASTContext::getFunctionNoProtoType(), clang::ASTContext::getFunctionType(), clang::ASTContext::getObjCObjectPointerType(), clang::ASTContext::getObjCObjectType(), clang::ASTContext::getQualifiedType(), isNull(), clang::Ordinary, clang::Parameter, clang::Property, clang::SplitQualType::Quals, QualType(), clang::Result, split(), substObjCTypeArgs(), clang::Superclass, clang::SplitQualType::Ty, clang::ast_matchers::type, and clang::FunctionProtoType::ExceptionSpecInfo::Type.
Referenced by clang::Sema::CheckMessageArgumentTypes(), clang::Sema::CodeCompleteObjCMethodDecl(), clang::ObjCObjectType::computeSuperClassTypeSlow(), clang::CodeCompletionResult::CreateCodeCompletionString(), formatBlockPlaceholder(), FormatFunctionParameter(), getReturnTypeForMethod(), clang::ObjCMethodDecl::getSendResultType(), substObjCMemberType(), and substObjCTypeArgs().
|
inline |
Definition at line 782 of file Type.h.
References clang::Qualifiers::Const.
Referenced by clang::Sema::ActOnForEachDeclStmt(), clang::Sema::ActOnOpenMPRegionStart(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildCXXUuidof(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCDictionaryLiteral(), captureInBlock(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitCopyConstructor(), DecodeTypeFromStr(), DiagnoseForRangeReferenceVariableCopies(), diagnoseListInit(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::ASTContext::getConstType(), clang::ObjCMethodDecl::getSelfType(), clang::Sema::SpecialMemberIsTrivial(), TryInitializerListConstruction(), and clang::CanQual< ObjCObjectType >::withConst().
Definition at line 802 of file Type.h.
Referenced by checkConditionalPointerCompatibility(), clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), and clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset().
Definition at line 833 of file Type.h.
References withFastQualifiers().
Definition at line 825 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().
|
inline |
Definition at line 838 of file Type.h.
References removeLocalFastQualifiers().
Referenced by getCoreType().
|
inline |
Definition at line 798 of file Type.h.
References clang::Qualifiers::Restrict.
Referenced by clang::Sema::ActOnOpenMPRegionStart(), DecodeTypeFromStr(), emitDestructorsFunction(), and emitProxyTaskFunction().
|
inline |
Definition at line 790 of file Type.h.
References clang::Qualifiers::Volatile.
|
friend |
1.8.6