clang  14.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. More...
 
TypeLoc getTypeLoc () const
 Return the TypeLoc wrapper for the type source info. More...
 
void overrideType (QualType T)
 Override the type stored in this TypeSourceInfo. Use with caution! More...
 

Friends

class ASTContext
 

Detailed Description

A container of type source information.

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

TypeLoc TL = TypeSourceInfo->getTypeLoc();
TL.getBeginLoc().print(OS, SrcMgr);

Definition at line 6395 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 6406 of file Type.h.

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnPackExpansion(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::ASTRecordWriter::AddTypeSourceInfo(), adjustFunctionTypeForInstantiation(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildBuiltinBitCastExpr(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCStyleCastExpr(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorLiteral(), checkAllAtProps(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckFriendTypeDecl(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CompleteVarTemplateSpecializationDecl(), clang::computeDependence(), clang::NonTypeTemplateParmDecl::Create(), createMakeIntegerSeqParameterList(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::UnaryExprOrTypeTraitExpr::getArgumentType(), clang::TemplateTypeParmDecl::getDefaultArgument(), clang::ObjCEncodeExpr::getEncodedType(), clang::ParmVarDecl::getOriginalType(), clang::ArrayTypeTraitExpr::getQueriedType(), clang::CXXBaseSpecifier::getType(), clang::CXXUnresolvedConstructExpr::getTypeAsWritten(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXUuidofExpr::getTypeOperand(), hasDeducedReturnType(), clang::ASTImporter::Import(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::Sema::InstantiateMemInitializers(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), IsStructurallyEquivalent(), NeedsInstantiationAsFunctionType(), print_initializer(), clang::TreeTransform< Derived >::RebuildObjCMessageExpr(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), clang::Sema::SemaConvertVectorExpr(), clang::Sema::startLambdaDefinition(), SubstDefaultTemplateArgument(), clang::Sema::SubstDefaultTemplateArgumentIfAvailable(), clang::Sema::SubstParmVarDecl(), clang::Sema::SubstType(), 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(), clang::ASTDeclWriter::VisitDeclaratorDecl(), clang::ASTNodeImporter::VisitFriendDecl(), clang::ASTDeclReader::VisitFunctionDecl(), clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitLocInfoType(), and clang::JSONNodeDumper::VisitSYCLUniqueStableNameExpr().

◆ 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 244 of file TypeLoc.h.

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXTypeConstructExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::actOnObjCProtocolQualifierType(), clang::Sema::ActOnTemplateTypeArgument(), clang::ASTRecordWriter::AddTypeSourceInfo(), clang::TemplateDeclInstantiator::adjustForRewrite(), clang::Sema::AttachTypeConstraint(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinBitCastExpr(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCStyleCastExpr(), clang::Sema::BuildCXXFunctionalCastExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildVAArgExpr(), CheckAbstractClassUsage(), checkAllAtProps(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckFriendTypeDecl(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkThisInStaticMemberFunctionExceptionSpec(), clang::Sema::checkThisInStaticMemberFunctionType(), clang::Sema::createLambdaInitCaptureVarDecl(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::comments::DeclInfo::fill(), findTypeLocationForBlockDecl(), clang::CXXBaseSpecifier::getBaseTypeLoc(), clang::CXXFunctionalCastExpr::getBeginLoc(), clang::CXXTemporaryObjectExpr::getBeginLoc(), clang::CXXUnresolvedConstructExpr::getBeginLoc(), clang::TemplateTypeParmDecl::getDefaultArgumentLoc(), clang::comments::getFunctionTypeLoc(), clang::FunctionDecl::getFunctionTypeLoc(), clang::ObjCMessageExpr::getReceiverRange(), clang::Sema::getReturnTypeLoc(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::ASTContext::getTrivialTypeSourceInfo(), getTypeRange(), clang::TypeLocBuilder::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecEndLoc(), clang::DeclaratorDecl::getTypeSpecStartLoc(), implicitObjectParamIsLifetimeBound(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexTypeSourceInfo(), NeedsInstantiationAsFunctionType(), clang::PseudoDestructorTypeStorage::PseudoDestructorTypeStorage(), clang::ASTRecordReader::readTypeSourceInfo(), clang::Sema::SubstExceptionSpec(), clang::Sema::SubstFunctionDeclType(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformType(), clang::TreeTransform< Derived >::TransformTypeWithDeducedTST(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().

◆ overrideType()

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

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

Definition at line 6412 of file Type.h.

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 6398 of file Type.h.


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