clang API Documentation
#include <DeclSpec.h>

Declarator - Information about one declarator, including the parsed type information and the identifier. When the declarator is fully formed, this is turned into the appropriate Decl object.
Declarators come in two types: normal declarators and abstract declarators. Abstract declarators are used when parsing types, and don't have an identifier. Normal declarators do have ID's.
Instances of this class should be a transient object that lives on the stack, not objects that are allocated in large quantities on the heap.
Definition at line 1415 of file DeclSpec.h.
Definition at line 1417 of file DeclSpec.h.
| clang::Declarator::Declarator | ( | const DeclSpec & | ds, |
| TheContext | C | ||
| ) | [inline] |
Definition at line 1497 of file DeclSpec.h.
| clang::Declarator::~Declarator | ( | ) | [inline] |
Definition at line 1506 of file DeclSpec.h.
References clear().
| void clang::Declarator::AddInnermostTypeInfo | ( | const DeclaratorChunk & | TI | ) | [inline] |
AddInnermostTypeInfo - Add a new innermost chunk to this declarator.
Definition at line 1736 of file DeclSpec.h.
Referenced by maybeSynthesizeBlockSignature().
| void clang::Declarator::AddTypeInfo | ( | const DeclaratorChunk & | TI, |
| ParsedAttributes & | attrs, | ||
| SourceLocation | EndLoc | ||
| ) | [inline] |
AddTypeInfo - Add a chunk to this declarator. Also extend the range to EndLoc, which should be the last token of the chunk.
Definition at line 1724 of file DeclSpec.h.
References getAttributePool(), clang::ParsedAttributes::getList(), clang::ParsedAttributes::getPool(), clang::SourceLocation::isInvalid(), SetRangeEnd(), and clang::AttributePool::takeAllFrom().
Referenced by clang::Sema::ImplicitlyDefineFunction().
| void clang::Declarator::clear | ( | ) | [inline] |
clear - Reset the contents of this Declarator.
Reimplemented in clang::ParsingDeclarator.
Definition at line 1570 of file DeclSpec.h.
References clang::CXXScopeSpec::clear(), clang::ParsedAttributes::clear(), clang::UnqualifiedId::clear(), and clang::DeclSpec::getSourceRange().
Referenced by ~Declarator().
| void clang::Declarator::DropFirstTypeObject | ( | ) | [inline] |
Definition at line 1755 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew().
| void clang::Declarator::ExtendWithDeclSpec | ( | const DeclSpec & | DS | ) | [inline] |
ExtendWithDeclSpec - Extend the declarator source range to include the given declspec, unless its location is invalid. Adopts the range start if the current range start is invalid.
Definition at line 1561 of file DeclSpec.h.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::DeclSpec::getSourceRange(), clang::SourceLocation::isInvalid(), clang::SourceRange::setBegin(), and clang::SourceRange::setEnd().
| Expr* clang::Declarator::getAsmLabel | ( | ) | const [inline] |
Definition at line 1870 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::Sema::ActOnVariableDeclarator().
| AttributePool& clang::Declarator::getAttributePool | ( | ) | const [inline] |
Definition at line 1521 of file DeclSpec.h.
References clang::ParsedAttributes::getPool().
Referenced by AddTypeInfo(), takeDeclAttributes(), and transferARCOwnershipToDeclaratorChunk().
| const AttributeList* clang::Declarator::getAttributes | ( | ) | const [inline] |
Definition at line 1855 of file DeclSpec.h.
References clang::ParsedAttributes::getList().
Referenced by clang::Sema::checkUnusedDeclAttributes(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), hasAttributes(), clang::Sema::ProcessDeclAttributes(), and takeDeclAttributes().
| AttributeList* clang::Declarator::getAttributes | ( | ) | [inline] |
Definition at line 1856 of file DeclSpec.h.
References clang::ParsedAttributes::getList().
| AttributeList*& clang::Declarator::getAttrListRef | ( | ) | [inline] |
Definition at line 1858 of file DeclSpec.h.
References clang::ParsedAttributes::getListRef().
Referenced by distributeFunctionTypeAttrFromDeclarator(), and distributeObjCPointerTypeAttrFromDeclarator().
| SourceLocation clang::Declarator::getCommaLoc | ( | ) | const [inline] |
Definition at line 1884 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator().
| TheContext clang::Declarator::getContext | ( | ) | const [inline] |
Definition at line 1533 of file DeclSpec.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnTypeName(), ConvertDeclSpecToType(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), and isOmittedBlockReturnType().
| const CXXScopeSpec& clang::Declarator::getCXXScopeSpec | ( | ) | const [inline] |
getCXXScopeSpec - Return the C++ scope specifier (global scope or nested-name-specifier) that is part of the declarator-id.
Definition at line 1527 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), and SetNestedNameSpecifier().
| CXXScopeSpec& clang::Declarator::getCXXScopeSpec | ( | ) | [inline] |
Definition at line 1528 of file DeclSpec.h.
| const DeclSpec& clang::Declarator::getDeclSpec | ( | ) | const [inline] |
getDeclSpec - Return the declaration-specifier that this declarator was declared with.
Reimplemented in clang::ParsingDeclarator.
Definition at line 1512 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXConditionDeclaration(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIvar(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckFieldDecl(), clang::Sema::checkUnusedDeclAttributes(), clang::Sema::containsUnexpandedParameterPacks(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), clang::Sema::DiagnoseFunctionSpecifiers(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), clang::Sema::GetTypeSourceInfoForDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), hasAttributes(), isOmittedBlockReturnType(), mayBeFollowedByCXXDirectInit(), clang::Sema::ParseTypedefDecl(), clang::Sema::ProcessDeclAttributes(), and takeDeclAttributes().
| SourceLocation clang::Declarator::getEllipsisLoc | ( | ) | const [inline] |
Definition at line 1888 of file DeclSpec.h.
Referenced by diagnoseMisplacedEllipsis(), GetFullTypeForDeclarator(), and clang::Sema::GetTypeSourceInfoForDeclarator().
| bool clang::Declarator::getExtension | ( | ) | const [inline] |
Definition at line 1873 of file DeclSpec.h.
| FunctionDefinitionKind clang::Declarator::getFunctionDefinitionKind | ( | ) | const [inline] |
Definition at line 1899 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and isFunctionDefinition().
| DeclaratorChunk::FunctionTypeInfo& clang::Declarator::getFunctionTypeInfo | ( | ) | [inline] |
getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses).
Definition at line 1818 of file DeclSpec.h.
References isFunctionDeclarator().
Referenced by clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfFunctionTemplateDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), CreateNewFunctionDecl(), getFunctionTypeInfo(), and maybeSynthesizeBlockSignature().
| const DeclaratorChunk::FunctionTypeInfo& clang::Declarator::getFunctionTypeInfo | ( | ) | const [inline] |
getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses).
Definition at line 1827 of file DeclSpec.h.
References getFunctionTypeInfo().
| IdentifierInfo* clang::Declarator::getIdentifier | ( | ) | const [inline] |
Definition at line 1709 of file DeclSpec.h.
References clang::UnqualifiedId::getKind(), clang::UnqualifiedId::Identifier, and clang::UnqualifiedId::IK_Identifier.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIvar(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypeName(), clang::Sema::CreatePropertyDecl(), GetFullTypeForDeclarator(), clang::Sema::HandleField(), clang::Sema::HandlePropertyInClassExtension(), clang::Parser::ObjCPropertyCallback::invoke(), and clang::Sema::ParseTypedefDecl().
| SourceLocation clang::Declarator::getIdentifierLoc | ( | ) | const [inline] |
Definition at line 1715 of file DeclSpec.h.
References clang::UnqualifiedId::StartLocation.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIvar(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), clang::Sema::CreatePropertyDecl(), diagnoseMisplacedEllipsis(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), clang::Sema::HandlePropertyInClassExtension(), clang::Sema::ParseTypedefDecl(), and RebuildDeclaratorInCurrentInstantiation().
| SourceLocation clang::Declarator::getLocEnd | ( | ) | const [inline] |
Definition at line 1544 of file DeclSpec.h.
References clang::SourceRange::getEnd().
| SourceLocation clang::Declarator::getLocStart | ( | ) | const [inline] |
Definition at line 1543 of file DeclSpec.h.
References clang::SourceRange::getBegin().
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnVariableDeclarator(), CreateNewFunctionDecl(), GetFullTypeForDeclarator(), clang::Sema::HandleField(), maybeSynthesizeBlockSignature(), and clang::Sema::ParseTypedefDecl().
| DeclSpec& clang::Declarator::getMutableDeclSpec | ( | ) | [inline] |
getMutableDeclSpec - Return a non-const version of the DeclSpec. This should be used with extreme care: declspecs can often be shared between multiple declarators, so mutating the DeclSpec affects all of the Declarators. This should only be done when the declspec is known to not be shared or when in error recovery etc.
Definition at line 1519 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), distributeObjCPointerTypeAttrFromDeclarator(), and RebuildDeclaratorInCurrentInstantiation().
| UnqualifiedId& clang::Declarator::getName | ( | ) | [inline] |
Retrieve the name specified by this declarator.
Definition at line 1531 of file DeclSpec.h.
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), and clang::Sema::GetNameForDeclarator().
| unsigned clang::Declarator::getNumTypeObjects | ( | ) | const [inline] |
getNumTypeObjects() - Return the number of types applied to this declarator.
Definition at line 1742 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::checkUnusedDeclAttributes(), clang::Sema::containsUnexpandedParameterPacks(), distributeFunctionTypeAttrToInnermost(), distributeObjCPointerTypeAttrFromDeclarator(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), clang::Sema::GetTypeSourceInfoForDeclarator(), hasAttributes(), inferARCWriteback(), isOmittedBlockReturnType(), maybeSynthesizeBlockSignature(), clang::Sema::ProcessDeclAttributes(), RebuildDeclaratorInCurrentInstantiation(), takeDeclAttributes(), and transferARCOwnership().
| const SourceRange& clang::Declarator::getSourceRange | ( | ) | const [inline] |
getSourceRange - Get the source range that spans this declarator.
Definition at line 1542 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXConditionDeclaration(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnStartOfLambdaDefinition(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), and clang::Parser::ObjCPropertyCallback::invoke().
| const DeclaratorChunk& clang::Declarator::getTypeObject | ( | unsigned | i | ) | const [inline] |
Return the specified TypeInfo from this declarator. TypeInfo #0 is closest to the identifier.
Definition at line 1746 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::checkUnusedDeclAttributes(), clang::Sema::containsUnexpandedParameterPacks(), distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), clang::Sema::GetTypeSourceInfoForDeclarator(), hasAttributes(), inferARCWriteback(), isOmittedBlockReturnType(), clang::Sema::ProcessDeclAttributes(), RebuildDeclaratorInCurrentInstantiation(), takeDeclAttributes(), transferARCOwnership(), and transferARCOwnershipToDeclaratorChunk().
| DeclaratorChunk& clang::Declarator::getTypeObject | ( | unsigned | i | ) | [inline] |
Definition at line 1750 of file DeclSpec.h.
| bool clang::Declarator::hasAttributes | ( | ) | const [inline] |
hasAttributes - do we contain any attributes?
Definition at line 1861 of file DeclSpec.h.
References getAttributes(), getDeclSpec(), getNumTypeObjects(), and getTypeObject().
| bool clang::Declarator::hasEllipsis | ( | ) | const [inline] |
Definition at line 1887 of file DeclSpec.h.
References clang::SourceLocation::isValid().
Referenced by clang::Sema::ActOnNonTypeTemplateParameter(), and GetFullTypeForDeclarator().
| bool clang::Declarator::hasGroupingParens | ( | ) | const [inline] |
Definition at line 1881 of file DeclSpec.h.
Referenced by mayBeFollowedByCXXDirectInit().
| bool clang::Declarator::hasName | ( | ) | const [inline] |
hasName - Whether this declarator has a name, which might be an identifier (accessible via getIdentifier()) or some kind of special C++ name (constructor, destructor, etc.).
Definition at line 1705 of file DeclSpec.h.
References clang::UnqualifiedId::getKind(), clang::UnqualifiedId::Identifier, and clang::UnqualifiedId::IK_Identifier.
Referenced by clang::Sema::ActOnParamDeclarator(), and diagnoseMisplacedEllipsis().
| bool clang::Declarator::isArrayOfUnknownBound | ( | ) | const [inline] |
isArrayOfUnknownBound - This method returns true if the declarator is a declarator for an array of unknown bound (looking through parentheses).
Definition at line 1765 of file DeclSpec.h.
References clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::DeclaratorChunk::Function, clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pointer, and clang::DeclaratorChunk::Reference.
| bool Declarator::isDeclarationOfFunction | ( | ) | const |
Determine whether the declaration that will be produced from this declaration will be a function.
A declaration can declare a function even if the declarator itself isn't a function declarator, if the type specifier refers to a function type. This routine checks for both cases.
Definition at line 233 of file DeclSpec.cpp.
References clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::DeclaratorChunk::Function, clang::OpaquePtr< PtrTy >::get(), clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::DeclSpec::getTypeSpecType(), clang::QualType::isNull(), clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::TST_atomic, clang::TST_auto, clang::TST_bool, clang::TST_char, clang::TST_char16, clang::TST_char32, clang::TST_class, clang::TST_decimal128, clang::TST_decimal32, clang::TST_decimal64, clang::TST_decltype, clang::TST_double, clang::TST_enum, clang::TST_error, clang::TST_float, clang::TST_half, clang::TST_int, clang::TST_int128, clang::TST_struct, clang::TST_typename, clang::TST_typeofExpr, clang::TST_typeofType, clang::TST_underlyingType, clang::TST_union, clang::TST_unknown_anytype, clang::TST_unspecified, clang::TST_void, and clang::TST_wchar.
Referenced by clang::Sema::ActOnCXXMemberDeclarator().
| bool clang::Declarator::isFirstDeclarator | ( | ) | const [inline] |
Definition at line 1883 of file DeclSpec.h.
References clang::SourceLocation::isValid().
Referenced by clang::Sema::ActOnFunctionDeclarator().
| bool clang::Declarator::isFunctionDeclarator | ( | unsigned & | idx | ) | const [inline] |
isFunctionDeclarator - This method returns true if the declarator is a function declarator (looking through parentheses). If true is returned, then the reference type parameter idx is assigned with the index of the declaration chunk.
Definition at line 1788 of file DeclSpec.h.
References clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::DeclaratorChunk::Function, clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pointer, and clang::DeclaratorChunk::Reference.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), CreateNewFunctionDecl(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), and maybeSynthesizeBlockSignature().
| bool clang::Declarator::isFunctionDeclarator | ( | ) | const [inline] |
isFunctionDeclarator - Once this declarator is fully parsed and formed, this method returns true if the identifier is a function declarator (looking through parentheses).
Definition at line 1811 of file DeclSpec.h.
Referenced by getFunctionTypeInfo().
| bool clang::Declarator::isFunctionDefinition | ( | ) | const [inline] |
Definition at line 1895 of file DeclSpec.h.
References clang::FDK_Declaration, and getFunctionDefinitionKind().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), and clang::Sema::ActOnFunctionDeclarator().
| bool clang::Declarator::isInvalidType | ( | ) | const [inline] |
Definition at line 1876 of file DeclSpec.h.
References clang::DeclSpec::getTypeSpecType(), and clang::TST_error.
Referenced by clang::Sema::ActOnCastExpr(), clang::Sema::ActOnCXXNamedCast(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnIvar(), clang::Sema::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypeName(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckFieldDecl(), CreateNewFunctionDecl(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), and clang::Sema::ParseTypedefDecl().
| bool clang::Declarator::isPastIdentifier | ( | ) | const [inline] |
isPastIdentifier - Return true if we have parsed beyond the point where the
Definition at line 1700 of file DeclSpec.h.
References clang::UnqualifiedId::isValid().
| bool clang::Declarator::isPrototypeContext | ( | ) | const [inline] |
Definition at line 1535 of file DeclSpec.h.
References ObjCParameterContext, ObjCResultContext, and PrototypeContext.
Referenced by GetFullTypeForDeclarator(), and clang::Sema::GetTypeForDeclarator().
| bool clang::Declarator::isRedeclaration | ( | ) | const [inline] |
Definition at line 1904 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTypedefDeclarator(), and clang::Sema::HandleDeclarator().
| bool clang::Declarator::mayBeFollowedByCXXDirectInit | ( | ) | const [inline] |
mayBeFollowedByCXXDirectInit - Return true if the declarator can be followed by a C++ direct initializer, e.g. "int x(1);".
Definition at line 1651 of file DeclSpec.h.
References AliasDeclContext, AliasTemplateContext, BlockContext, BlockLiteralContext, ConditionContext, CXXCatchContext, CXXNewContext, FileContext, ForContext, getDeclSpec(), clang::UnqualifiedId::getKind(), hasGroupingParens(), clang::UnqualifiedId::IK_Identifier, KNRTypeListContext, LambdaExprContext, MemberContext, ObjCCatchContext, ObjCParameterContext, ObjCResultContext, PrototypeContext, clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_typedef, TemplateParamContext, TemplateTypeArgContext, TrailingReturnContext, and TypeNameContext.
| bool clang::Declarator::mayHaveIdentifier | ( | ) | const [inline] |
mayHaveIdentifier - Return true if the identifier is either optional or required. This is true for normal declarators and prototypes, but not typenames.
Definition at line 1620 of file DeclSpec.h.
References AliasDeclContext, AliasTemplateContext, BlockContext, BlockLiteralContext, ConditionContext, CXXCatchContext, CXXNewContext, FileContext, ForContext, KNRTypeListContext, LambdaExprContext, MemberContext, ObjCCatchContext, ObjCParameterContext, ObjCResultContext, PrototypeContext, TemplateParamContext, TemplateTypeArgContext, TrailingReturnContext, and TypeNameContext.
| bool clang::Declarator::mayOmitIdentifier | ( | ) | const [inline] |
mayOmitIdentifier - Return true if the identifier is either optional or not allowed. This is true for typenames, prototypes, and template parameter lists.
Definition at line 1588 of file DeclSpec.h.
References AliasDeclContext, AliasTemplateContext, BlockContext, BlockLiteralContext, ConditionContext, CXXCatchContext, CXXNewContext, FileContext, ForContext, KNRTypeListContext, LambdaExprContext, MemberContext, ObjCCatchContext, ObjCParameterContext, ObjCResultContext, PrototypeContext, TemplateParamContext, TemplateTypeArgContext, TrailingReturnContext, and TypeNameContext.
| void clang::Declarator::setAsmLabel | ( | Expr * | E | ) | [inline] |
Definition at line 1869 of file DeclSpec.h.
| void clang::Declarator::setCommaLoc | ( | SourceLocation | CL | ) | [inline] |
Definition at line 1885 of file DeclSpec.h.
| void clang::Declarator::setEllipsisLoc | ( | SourceLocation | EL | ) | [inline] |
Definition at line 1889 of file DeclSpec.h.
Referenced by diagnoseMisplacedEllipsis(), and GetFullTypeForDeclarator().
| void clang::Declarator::setExtension | ( | bool | Val = true | ) | [inline] |
Definition at line 1872 of file DeclSpec.h.
| void clang::Declarator::setFunctionDefinitionKind | ( | FunctionDefinitionKind | Val | ) | [inline] |
Definition at line 1891 of file DeclSpec.h.
Referenced by clang::Sema::ActOnDeclarator(), clang::Sema::ActOnStartOfFunctionDef(), and clang::Sema::ActOnStartOfFunctionTemplateDef().
| void clang::Declarator::setGroupingParens | ( | bool | flag | ) | [inline] |
Definition at line 1880 of file DeclSpec.h.
| void clang::Declarator::SetIdentifier | ( | IdentifierInfo * | Id, |
| SourceLocation | IdLoc | ||
| ) | [inline] |
Set the name of this declarator to be the given identifier.
Definition at line 1718 of file DeclSpec.h.
References clang::UnqualifiedId::setIdentifier().
Referenced by clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::ActOnParamDeclarator(), and clang::Sema::ImplicitlyDefineFunction().
| void clang::Declarator::setInvalidType | ( | bool | Val = true | ) | [inline] |
Definition at line 1875 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnIvar(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), clang::Sema::HandleDeclarator(), and clang::Sema::HandleField().
| void clang::Declarator::SetRangeBegin | ( | SourceLocation | Loc | ) | [inline] |
SetRangeBegin - Set the start of the source range to Loc, unless it's invalid.
Definition at line 1549 of file DeclSpec.h.
References clang::SourceLocation::isInvalid(), and clang::SourceRange::setBegin().
| void clang::Declarator::SetRangeEnd | ( | SourceLocation | Loc | ) | [inline] |
SetRangeEnd - Set the end of the source range to Loc, unless it's invalid.
Definition at line 1554 of file DeclSpec.h.
References clang::SourceLocation::isInvalid(), and clang::SourceRange::setEnd().
Referenced by AddTypeInfo(), and takeAttributes().
| void clang::Declarator::setRedeclaration | ( | bool | Val | ) | [inline] |
Definition at line 1903 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTypedefDeclarator(), and clang::Sema::ActOnVariableDeclarator().
| void clang::Declarator::SetSourceRange | ( | SourceRange | R | ) | [inline] |
Definition at line 1546 of file DeclSpec.h.
| void clang::Declarator::takeAttributes | ( | ParsedAttributes & | attrs, |
| SourceLocation | lastLoc | ||
| ) | [inline] |
takeAttributes - Takes attributes from the given parsed-attributes set and add them to this declarator.
These examples both add 3 attributes to "var": short int var __attribute__((aligned(16),common,deprecated)); short int x, __attribute__((aligned(16)) var __attribute__((common,deprecated));
Also extends the range of the declarator.
Definition at line 1848 of file DeclSpec.h.
References clang::SourceLocation::isInvalid(), SetRangeEnd(), and clang::ParsedAttributes::takeAllFrom().
friend struct DeclaratorChunk [friend] |
Definition at line 1494 of file DeclSpec.h.