clang  6.0.0svn
Public Member Functions | Friends | List of all members
clang::TypeSourceInfo Class Reference

A container of type source information. More...

#include "clang/AST/Decl.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.getStartLoc().print(OS, SrcMgr);

Definition at line 86 of file Decl.h.

Member Function Documentation

◆ getType()

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

Return the type wrapped by this type source info.

Definition at line 97 of file Decl.h.

References getTypeLoc().

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnPackExpansion(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCStyleCastExpr(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildCXXUuidof(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), checkAllAtProps(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckFriendTypeDecl(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckVariableDeclarationType(), computeDeclRefDependence(), clang::ExprWithCleanups::Create(), clang::OffsetOfExpr::CreateEmpty(), createMakeIntegerSeqParameterList(), createTypePackElementParameterList(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), DiagnoseBaseOrMemInitializerOrder(), clang::Sema::DiagnoseUnexpandedParameterPack(), dumpPreviousDecl(), EmitDiagForCXXThrowInNonThrowingFunc(), clang::FunctionDecl::getCallResultType(), clang::ObjCEncodeExpr::getEncodedType(), clang::diff::getInitializerValue(), clang::EnumDecl::getIntegerType(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), clang::ParmVarDecl::getOriginalType(), clang::ArrayTypeTraitExpr::getQueriedType(), clang::FunctionDecl::getReturnType(), clang::CXXBaseSpecifier::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::CXXUnresolvedConstructExpr::getTypeAsWritten(), clang::TypedefNameDecl::getUnderlyingType(), clang::Sema::HandleMSProperty(), hasDeducedReturnType(), clang::hasImplicitExceptionSpec(), clang::VarDecl::hasLocalStorage(), clang::ASTImporter::Import(), clang::InitializedEntity::InitializeCompoundLiteralInit(), clang::InitializedEntity::InitializeTemporary(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), NeedsInstantiationAsFunctionType(), print_elem(), PrintFloatingLiteral(), clang::TreeTransform< Derived >::RebuildObjCMessageExpr(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::Sema::SemaConvertVectorExpr(), clang::Sema::startLambdaDefinition(), SubstDefaultTemplateArgument(), clang::Sema::SubstDefaultTemplateArgumentIfAvailable(), clang::Sema::SubstParmVarDecl(), clang::Sema::SubstType(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformReferenceType(), clang::TreeTransform< Derived >::TransformType(), clang::TreeTransform< Derived >::TransformTypeWithDeducedTST(), UseNSOptionsMacro(), clang::TemplateDeclInstantiator::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

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

References clang::TypeLoc::Ty, and clang::TypeLoc::TypeLoc().

Referenced by clang::ASTRecordWriter::AddTypeSourceInfo(), AnalyzeBitFieldAssignment(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCStyleCastExpr(), clang::Sema::BuildCXXFunctionalCastExpr(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildPseudoDestructorExpr(), 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::DeduceAutoType(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::comments::DeclInfo::fill(), findTypeLocationForBlockDecl(), clang::CXXBaseSpecifier::getBaseTypeLoc(), clang::FunctionDecl::getExceptionSpecSourceRange(), clang::comments::getFunctionTypeLoc(), clang::CXXUnresolvedConstructExpr::getLocStart(), clang::Sema::getReturnTypeLoc(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::ASTContext::getTrivialTypeSourceInfo(), getType(), getTypeRange(), clang::ASTReader::GetTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::ASTImporter::Import(), clang::index::IndexingContext::indexTypeSourceInfo(), IsTailPaddedMemberArray(), NeedsInstantiationAsFunctionType(), clang::PseudoDestructorTypeStorage::PseudoDestructorTypeStorage(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::Sema::SubstExceptionSpec(), clang::Sema::SubstFunctionDeclType(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TreeTransform< Derived >::TransformType(), and clang::TreeTransform< Derived >::TransformTypeWithDeducedTST().

◆ overrideType()

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

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

Definition at line 103 of file Decl.h.

References clang::T.

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 89 of file Decl.h.


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