clang 20.0.0git
Public Member Functions | Friends | List of all members
clang::TypeSourceInfo Class Reference

A container of type source information. More...

#include "clang/AST/Type.h"

Public Member Functions

QualType getType () const
 Return the type wrapped by this type source info.
 
TypeLoc getTypeLoc () const
 Return the TypeLoc wrapper for the type source info.
 
void overrideType (QualType T)
 Override the type stored in this TypeSourceInfo. Use with caution!
 

Friends

class ASTContext
 

Detailed Description

A container of type source information.

A client can read the relevant info using TypeLoc wrappers, e.g:

TL.getBeginLoc().print(OS, SrcMgr);
void print(raw_ostream &OS, const SourceManager &SM) const
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:59
SourceLocation getBeginLoc() const
Get the begin source location.
Definition: TypeLoc.cpp:192
A container of type source information.
Definition: Type.h:7721
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
Definition: TypeLoc.h:256

Definition at line 7721 of file Type.h.

Member Function Documentation

◆ getType()

QualType clang::TypeSourceInfo::getType ( ) const
inline

Return the type wrapped by this type source info.

Definition at line 7732 of file Type.h.

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnIvar(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::SemaObjC::actOnObjCTypeParam(), clang::SemaOpenMP::ActOnOpenMPDeclareMapperVarDecl(), clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnParamDeclarator(), clang::SemaObjC::ActOnProperty(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnTypeName(), clang::Sema::ActOnTypeParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::AddAlignedAttr(), clang::ASTRecordWriter::AddTypeSourceInfo(), adjustFunctionTypeForInstantiation(), clang::applyObjCTypeArgs(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildBuiltinBitCastExpr(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCStyleCastExpr(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildExceptionDeclaration(), clang::SemaObjC::BuildObjCBridgedCast(), clang::SemaObjC::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), buildTypeForLambdaCallOperator(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorLiteral(), clang::Sema::CheckAlignasTypeArgument(), checkAllAtProps(), clang::Sema::CheckBaseSpecifier(), CheckConvertibilityForTypeTraits(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTypedefForVariablyModifiedType(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CompleteVarTemplateSpecializationDecl(), clang::computeDependence(), clang::Sema::ConvertVectorExpr(), clang::NonTypeTemplateParmDecl::Create(), clang::Sema::CreateGenericSelectionExpr(), createMakeIntegerSeqParameterList(), createTypePackElementParameterList(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::deduceVarTypeFromInitializer(), clang::ODRDiagsEmitter::diagnoseMismatch(), clang::Sema::DiagnoseUnusedExprResult(), EmitDiagForCXXThrowInNonThrowingFunc(), EvaluateBinaryTypeTrait(), EvaluateUnaryTypeTrait(), clang::Sema::findInheritingConstructor(), clang::UnaryExprOrTypeTraitExpr::getArgumentType(), clang::ObjCEncodeExpr::getEncodedType(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForVar(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForVarTemplate(), getLambdaType(), clang::ParmVarDecl::getOriginalType(), clang::ArrayTypeTraitExpr::getQueriedType(), clang::CXXBaseSpecifier::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::CXXUnresolvedConstructExpr::getTypeAsWritten(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), handleAlignedAttr(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), hasDeducedReturnType(), clang::ASTImporter::Import(), clang::InitializedEntity::InitializeCompoundLiteralInit(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), IsEquivalentFriend(), clang::Sema::IsPointerInterconvertibleBaseOf(), IsStructurallyEquivalent(), print_initializer(), printArgument(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), RebuildDeclaratorInCurrentInstantiation(), clang::TreeTransform< Derived >::RebuildObjCMessageExpr(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::TreeTransform< Derived >::TransformType(), clang::TreeTransform< Derived >::TransformTypeWithDeducedTST(), TryToFixInvalidVariablyModifiedTypeSourceInfo(), clang::Sema::tryToFixVariablyModifiedVarType(), clang::TextNodeDumper::Visit(), clang::JSONNodeDumper::VisitCXXTypeidExpr(), and clang::ASTDeclReader::VisitFunctionDecl().

◆ getTypeLoc()

TypeLoc clang::TypeSourceInfo::getTypeLoc ( ) const
inline

Return the TypeLoc wrapper for the type source info.

Return the TypeLoc for a type source info.

Definition at line 256 of file TypeLoc.h.

Referenced by clang::Sema::ActOnAliasDeclaration(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXTypeConstructExpr(), clang::Sema::ActOnFriendTypeDecl(), clang::SemaObjC::ActOnMethodDeclaration(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::actOnObjCProtocolQualifierType(), clang::SemaObjC::actOnObjCTypeArgsAndProtocolQualifiers(), clang::SemaObjC::actOnObjCTypeParam(), clang::SemaOpenMP::ActOnOMPIteratorExpr(), clang::SemaObjC::ActOnSuperClassOfClassInterface(), clang::Sema::ActOnTag(), clang::Sema::ActOnTemplatedFriendTag(), clang::Sema::ActOnTemplateTypeArgument(), clang::Sema::ActOnTypeName(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAlignedAttr(), addFunctionPointerConversion(), clang::ASTRecordWriter::AddTypeSourceInfo(), clang::TemplateDeclInstantiator::adjustForRewrite(), clang::SemaObjC::AdjustParameterTypeForObjCAutoRefCount(), AnalyzeBitFieldAssignment(), clang::applyObjCTypeArgs(), clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P(), clang::Sema::AttachTypeConstraint(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinBitCastExpr(), clang::Sema::BuildBuiltinOffsetOf(), clang::SemaObjC::BuildClassMessage(), clang::Sema::BuildCStyleCastExpr(), clang::Sema::BuildCXXFunctionalCastExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildMemInitializer(), clang::SemaObjC::BuildObjCBridgedCast(), clang::SemaObjC::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildVAArgExpr(), CheckAbstractClassUsage(), checkAllAtProps(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckConversionDeclarator(), CheckConvertibilityForTypeTraits(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckFunctionDeclaration(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckParameter(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkThisInStaticMemberFunctionExceptionSpec(), clang::Sema::checkThisInStaticMemberFunctionType(), checkTypeParamListConsistency(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::SemaObjC::CreatePropertyDecl(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::deduceVarTypeFromInitializer(), DiagnoseCalleeStaticArrayParam(), clang::ODRDiagsEmitter::diagnoseMismatch(), clang::Sema::DiagnoseUnusedExprResult(), EvaluateBinaryTypeTrait(), clang::comments::DeclInfo::fill(), clang::Sema::findInheritingConstructor(), findTypeLocationForBlockDecl(), clang::CXXBaseSpecifier::getBaseTypeLoc(), clang::CXXFunctionalCastExpr::getBeginLoc(), clang::CXXTemporaryObjectExpr::getBeginLoc(), GetFullTypeForDeclarator(), clang::FunctionDecl::getFunctionTypeLoc(), clang::comments::getFunctionTypeLoc(), getPointeeTypeText(), clang::ObjCMessageExpr::getReceiverRange(), clang::Sema::getReturnTypeLoc(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::ASTContext::getTrivialTypeSourceInfo(), getTypeRange(), clang::TypeLocBuilder::getTypeSourceInfo(), GetTypeSourceInfoForDeclarator(), clang::DeclaratorDecl::getTypeSpecEndLoc(), clang::DeclaratorDecl::getTypeSpecStartLoc(), handleAlignedAttr(), handlePreferredTypeAttr(), clang::sema::implicitObjectParamIsLifetimeBound(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexTypeSourceInfo(), InventTemplateParameter(), clang::Decl::isFlexibleArrayMemberLike(), clang::Sema::IsPointerInterconvertibleBaseOf(), clang::NestedNameSpecifierLocBuilder::MakeTrivial(), clang::PseudoDestructorTypeStorage::PseudoDestructorTypeStorage(), clang::ASTRecordReader::readTypeSourceInfo(), clang::Sema::SubstExceptionSpec(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformType(), clang::TreeTransform< Derived >::TransformTypeWithDeducedTST(), clang::RecursiveASTVisitor< Derived >::TraverseConceptTypeRequirement(), TryToFixInvalidVariablyModifiedTypeSourceInfo(), and clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitMemberPointerTypeLoc().

◆ overrideType()

void clang::TypeSourceInfo::overrideType ( QualType  T)
inline

Override the type stored in this TypeSourceInfo. Use with caution!

Definition at line 7738 of file Type.h.

References clang::T.

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 7724 of file Type.h.


The documentation for this class was generated from the following files: