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

One of these records is kept for each identifier that is lexed. More...

#include "clang/Basic/IdentifierTable.h"

Public Member Functions

 IdentifierInfo (const IdentifierInfo &)=delete
 
IdentifierInfooperator= (const IdentifierInfo &)=delete
 
 IdentifierInfo (IdentifierInfo &&)=delete
 
IdentifierInfooperator= (IdentifierInfo &&)=delete
 
template<std::size_t StrLen>
bool isStr (const char(&Str)[StrLen]) const
 Return true if this is the identifier for the specified string.
 
bool isStr (llvm::StringRef Str) const
 Return true if this is the identifier for the specified StringRef.
 
const char * getNameStart () const
 Return the beginning of the actual null-terminated string for this identifier.
 
unsigned getLength () const
 Efficiently return the length of this identifier info.
 
StringRef getName () const
 Return the actual identifier string.
 
bool hasMacroDefinition () const
 Return true if this identifier is #defined to some other value.
 
void setHasMacroDefinition (bool Val)
 
bool hadMacroDefinition () const
 Returns true if this identifier was #defined to some value at any moment.
 
bool isDeprecatedMacro () const
 
void setIsDeprecatedMacro (bool Val)
 
bool isRestrictExpansion () const
 
void setIsRestrictExpansion (bool Val)
 
bool isFinal () const
 
void setIsFinal (bool Val)
 
tok::TokenKind getTokenID () const
 If this is a source-language token (e.g.
 
bool hasRevertedTokenIDToIdentifier () const
 True if revertTokenIDToIdentifier() was called.
 
void revertTokenIDToIdentifier ()
 Revert TokenID to tok::identifier; used for GNU libstdc++ 4.2 compatibility.
 
void revertIdentifierToTokenID (tok::TokenKind TK)
 
tok::PPKeywordKind getPPKeywordID () const
 Return the preprocessor keyword ID for this identifier.
 
tok::ObjCKeywordKind getObjCKeywordID () const
 Return the Objective-C keyword ID for the this identifier.
 
void setObjCKeywordID (tok::ObjCKeywordKind ID)
 
unsigned getBuiltinID () const
 Return a value indicating whether this is a builtin function.
 
void setBuiltinID (unsigned ID)
 
void clearBuiltinID ()
 
tok::NotableIdentifierKind getNotableIdentifierID () const
 
void setNotableIdentifierID (unsigned ID)
 
unsigned getObjCOrBuiltinID () const
 
void setObjCOrBuiltinID (unsigned ID)
 
bool isExtensionToken () const
 get/setExtension - Initialize information about whether or not this language token is an extension.
 
void setIsExtensionToken (bool Val)
 
bool isFutureCompatKeyword () const
 is/setIsFutureCompatKeyword - Initialize information about whether or not this language token is a keyword in a newer or proposed Standard.
 
void setIsFutureCompatKeyword (bool Val)
 
void setIsPoisoned (bool Value=true)
 setIsPoisoned - Mark this identifier as poisoned.
 
bool isPoisoned () const
 Return true if this token has been poisoned.
 
void setIsCPlusPlusOperatorKeyword (bool Val=true)
 isCPlusPlusOperatorKeyword/setIsCPlusPlusOperatorKeyword controls whether this identifier is a C++ alternate representation of an operator.
 
bool isCPlusPlusOperatorKeyword () const
 
bool isKeyword (const LangOptions &LangOpts) const
 Return true if this token is a keyword in the specified language.
 
bool isCPlusPlusKeyword (const LangOptions &LangOpts) const
 Return true if this token is a C++ keyword in the specified language.
 
void * getFETokenInfo () const
 Get and set FETokenInfo.
 
void setFETokenInfo (void *T)
 
bool isHandleIdentifierCase () const
 Return true if the Preprocessor::HandleIdentifier must be called on a token of this identifier.
 
bool isFromAST () const
 Return true if the identifier in its current state was loaded from an AST file.
 
void setIsFromAST ()
 
bool hasChangedSinceDeserialization () const
 Determine whether this identifier has changed since it was loaded from an AST file.
 
void setChangedSinceDeserialization ()
 Note that this identifier has changed since it was loaded from an AST file.
 
bool hasFETokenInfoChangedSinceDeserialization () const
 Determine whether the frontend token information for this identifier has changed since it was loaded from an AST file.
 
void setFETokenInfoChangedSinceDeserialization ()
 Note that the frontend token information for this identifier has changed since it was loaded from an AST file.
 
bool isOutOfDate () const
 Determine whether the information for this identifier is out of date with respect to the external source.
 
void setOutOfDate (bool OOD)
 Set whether the information for this identifier is out of date with respect to the external source.
 
bool isModulesImport () const
 Determine whether this is the contextual keyword import.
 
void setModulesImport (bool I)
 Set whether this identifier is the contextual keyword import.
 
bool isMangledOpenMPVariantName () const
 Determine whether this is the mangled name of an OpenMP variant.
 
void setMangledOpenMPVariantName (bool I)
 Set whether this is the mangled name of an OpenMP variant.
 
bool isEditorPlaceholder () const
 Return true if this identifier is an editor placeholder.
 
ReservedIdentifierStatus isReserved (const LangOptions &LangOpts) const
 Determine whether this is a name reserved for the implementation (C99 7.1.3, C++ [lib.global.names]).
 
ReservedLiteralSuffixIdStatus isReservedLiteralSuffixId () const
 Determine whether this is a name reserved for future standardization or the implementation (C++ [usrlit.suffix]).
 
StringRef deuglifiedName () const
 If the identifier is an "uglified" reserved name, return a cleaned form.
 
bool isPlaceholder () const
 
bool operator< (const IdentifierInfo &RHS) const
 Provide less than operator for lexicographical sorting.
 

Friends

class IdentifierTable
 

Detailed Description

One of these records is kept for each identifier that is lexed.

This contains information about whether the token was #define'd, is a language keyword, or if it is a front-end token of some sort (e.g. a variable or function name). The preprocessor keeps this information in a set, and all tok::identifier tokens have a pointer to one of these. It is aligned to 8 bytes because DeclarationName needs the lower 3 bits.

Definition at line 117 of file IdentifierTable.h.

Constructor & Destructor Documentation

◆ IdentifierInfo() [1/2]

clang::IdentifierInfo::IdentifierInfo ( const IdentifierInfo )
delete

◆ IdentifierInfo() [2/2]

clang::IdentifierInfo::IdentifierInfo ( IdentifierInfo &&  )
delete

Member Function Documentation

◆ clearBuiltinID()

void clang::IdentifierInfo::clearBuiltinID ( )
inline

Definition at line 374 of file IdentifierTable.h.

◆ deuglifiedName()

StringRef IdentifierInfo::deuglifiedName ( ) const

If the identifier is an "uglified" reserved name, return a cleaned form.

e.g. _Foo => Foo. Otherwise, just returns the name.

Definition at line 418 of file IdentifierTable.cpp.

References getName().

Referenced by AddTemplateParameterChunks(), and FormatFunctionParameter().

◆ getBuiltinID()

unsigned clang::IdentifierInfo::getBuiltinID ( ) const
inline

Return a value indicating whether this is a builtin function.

Definition at line 357 of file IdentifierTable.h.

Referenced by clang::SemaARM::handleBuiltinAliasAttr(), handleBuiltinAliasAttr(), clang::ASTImporter::Import(), isInterestingIdentifier(), and clang::Sema::LookupBuiltin().

◆ getFETokenInfo()

void * clang::IdentifierInfo::getFETokenInfo ( ) const
inline

Get and set FETokenInfo.

The language front-end is allowed to associate arbitrary metadata with this token.

Definition at line 457 of file IdentifierTable.h.

Referenced by isInterestingIdentifier().

◆ getLength()

unsigned clang::IdentifierInfo::getLength ( ) const
inline

◆ getName()

StringRef clang::IdentifierInfo::getName ( ) const
inline

Return the actual identifier string.

Definition at line 247 of file IdentifierTable.h.

Referenced by clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnPragmaMSAllocText(), clang::Sema::ActOnPragmaRedefineExtname(), clang::Sema::ActOnPragmaVisibility(), clang::Sema::ActOnTemplateIdType(), clang::comments::Sema::actOnTParamCommandParamNameArg(), clang::Sema::ActOnUsingEnumDeclaration(), clang::TypoCorrectionConsumer::addCorrection(), AddDefinedMacroToHash(), clang::ODRHash::AddIdentifierInfo(), AddObjCKeyValueCompletions(), clang::ento::AnyFunctionCall::argumentsMayEscape(), attributeAcceptsExprPack(), attributeHasIdentifierArg(), attributeHasStrictIdentifierArgs(), attributeHasVariadicIdentifierArg(), attributeIsTypeArgAttr(), attributeParsedArgsUnevaluated(), attributeStringLiteralListArg(), attributeTreatsKeywordThisAsIdentifier(), clang::ento::RetainSummaryManager::canEval(), CheckAvailability(), checkAvailabilityAttr(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::checkLiteralOperatorId(), clang::SemaCodeCompletion::CodeCompleteAttribute(), clang::SemaCodeCompletion::CodeCompleteObjCMethodDeclSelector(), clang::DeclarationName::compare(), clang::ExtVectorElementExpr::containsDuplicateElements(), clang::CodeCompletionResult::CreateCodeCompletionStringForMacro(), createOverloadsForFixedParams(), clang::Sema::DeclApplyPragmaWeak(), deuglifiedName(), clang::Sema::DiagnoseUnknownTemplateName(), clang::Sema::DiagnoseUnknownTypeName(), clang::MacroInfo::dump(), clang::Preprocessor::emitMacroExpansionWarnings(), encodeTypeForFunctionPointerAuth(), EvaluateDefined(), EvaluateValue(), fixParamWithSpan(), clang::ento::coreFoundation::followsCreateRule(), clang::Diagnostic::FormatDiagnostic(), clang::index::generateUSRForMacro(), clang::Selector::getAsString(), getCalleeName(), clang::ento::CheckerContext::getCalleeName(), clang::ObjCPropertyDecl::getDefaultSynthIvarName(), clang::Sema::getDestructorName(), clang::ExtVectorElementExpr::getEncodedElementAccess(), clang::IdentifierTable::getFutureCompatDiagKind(), getIdentifier(), clang::ento::ExprEngine::getInitialState(), clang::Selector::getInstTypeMethodFamily(), getMangledNameImpl(), clang::NamedDecl::getName(), clang::ObjCImplementationDecl::getName(), clang::MacroExpansion::getName(), clang::Selector::getNameForSlot(), clang::Sema::getTypeName(), clang::SemaOpenCL::handleAccessAttr(), handleArgumentWithTypeTagAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaSwift::handleAsyncError(), handleAvailabilityAttr(), clang::SemaObjC::handleBlocksAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCFGuardAttr(), handleConsumableAttr(), handleCPUSpecificAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), clang::SemaSwift::handleError(), handleFormatAttr(), clang::Preprocessor::HandleIdentifier(), handleLoopHintAttr(), clang::SemaObjC::handleMethodFamilyAttr(), clang::SemaSwift::handleNewType(), handleNonBlockingNonAllocatingTypeAttr(), handleNoSanitizeSpecificAttr(), HandleOpenCLAccessAttr(), handleParamTypestateAttr(), clang::PragmaNamespace::HandlePragma(), clang::Preprocessor::HandlePragmaModuleBuild(), clang::Preprocessor::HandlePragmaPopMacro(), handleReturnTypestateAttr(), handleSetTypestateAttr(), handleTestTypestateAttr(), handleVTablePointerAuthentication(), hasMatchingEnvironmentOrNone(), clang::Sema::ImplicitlyDefineFunction(), clang::ASTImporter::Import(), clang::CallGraph::includeCalleeInGraph(), InNamespace(), clang::Sema::InventAbbreviatedTemplateParameterTypeName(), IsAttributeLateParsedExperimentalExt(), IsAttributeLateParsedStandard(), IsBuiltInOrStandardCXX11Attribute(), clang::ento::CheckerContext::isCLibraryFunction(), isConfigurationPattern(), clang::Sema::isCurrentClassNameTypo(), clang::ento::CheckerContext::isHardenedVariantOf(), clang::ento::RetainSummaryManager::isKnownSmartPointer(), isReferenceCountingPointerDestructor(), isReserved(), isReservedLiteralSuffixId(), IsStructurallyEquivalent(), isTargetArch(), isTargetEnvironment(), isTargetOS(), isTargetVariantEnvironment(), isTargetVariantOS(), isTargetVendor(), clang::Preprocessor::LexEmbedParameters(), clang::Sema::LookupBuiltin(), clang::detail::MacroExpansionRangeRecorder::MacroExpands(), clang::Sema::mergeAvailabilityAttr(), operator<(), parseDeclareSimdClauses(), clang::Parser::parseMapTypeModifiers(), clang::Parser::ParseUnqualifiedId(), PragmaLoopHintString(), clang::DeclarationName::print(), clang::NestedNameSpecifier::print(), PrintMacroDefinition(), clang::RewriteMacrosInInput(), rewriteToNSEnumDecl(), rewriteToNSMacroDecl(), clang::Sema::setTagNameForLinkagePurposes(), shouldWarnOnMacroDef(), TryNamespaceTypoCorrection(), clang::ASTReader::updateOutOfDateIdentifier(), ValidateObjCLiteralInterfaceDecl(), and clang::JSONNodeDumper::VisitMacroQualifiedType().

◆ getNameStart()

const char * clang::IdentifierInfo::getNameStart ( ) const
inline

Return the beginning of the actual null-terminated string for this identifier.

Definition at line 241 of file IdentifierTable.h.

Referenced by CheckExtVectorComponent(), clang::Preprocessor::dumpMacroInfo(), clang::LabelStmt::getName(), and getPPKeywordID().

◆ getNotableIdentifierID()

tok::NotableIdentifierKind clang::IdentifierInfo::getNotableIdentifierID ( ) const
inline

Definition at line 379 of file IdentifierTable.h.

Referenced by isInterestingIdentifier().

◆ getObjCKeywordID()

tok::ObjCKeywordKind clang::IdentifierInfo::getObjCKeywordID ( ) const
inline

Return the Objective-C keyword ID for the this identifier.

For example, 'class' will return tok::objc_class if ObjC is enabled.

Definition at line 343 of file IdentifierTable.h.

Referenced by clang::Token::getObjCKeywordID(), and isInterestingIdentifier().

◆ getObjCOrBuiltinID()

unsigned clang::IdentifierInfo::getObjCOrBuiltinID ( ) const
inline

Definition at line 399 of file IdentifierTable.h.

◆ getPPKeywordID()

tok::PPKeywordKind IdentifierInfo::getPPKeywordID ( ) const

Return the preprocessor keyword ID for this identifier.

For example, "define" will return tok::pp_define.

Definition at line 426 of file IdentifierTable.cpp.

References CASE, getLength(), getNameStart(), and HASH.

Referenced by clang::Preprocessor::CheckMacroName(), diagnoseAutoModuleImport(), and clang::Preprocessor::HandleDirective().

◆ getTokenID()

tok::TokenKind clang::IdentifierInfo::getTokenID ( ) const
inline

◆ hadMacroDefinition()

bool clang::IdentifierInfo::hadMacroDefinition ( ) const
inline

Returns true if this identifier was #defined to some value at any moment.

In this case there should be an entry for the identifier in the macro history table in Preprocessor.

Definition at line 278 of file IdentifierTable.h.

Referenced by clang::Preprocessor::getLocalMacroDirectiveHistory(), clang::Preprocessor::getMacroDefinitionAtLoc(), and isInterestingIdentifier().

◆ hasChangedSinceDeserialization()

bool clang::IdentifierInfo::hasChangedSinceDeserialization ( ) const
inline

Determine whether this identifier has changed since it was loaded from an AST file.

Definition at line 475 of file IdentifierTable.h.

◆ hasFETokenInfoChangedSinceDeserialization()

bool clang::IdentifierInfo::hasFETokenInfoChangedSinceDeserialization ( ) const
inline

Determine whether the frontend token information for this identifier has changed since it was loaded from an AST file.

Definition at line 487 of file IdentifierTable.h.

◆ hasMacroDefinition()

bool clang::IdentifierInfo::hasMacroDefinition ( ) const
inline

Return true if this identifier is #defined to some other value.

Note
The current definition may be in a module and not currently visible.

Definition at line 253 of file IdentifierTable.h.

Referenced by clang::Preprocessor::getLocalMacroDirective(), clang::Preprocessor::getMacroDefinition(), clang::Preprocessor::getMacroInfo(), clang::Preprocessor::isMacroDefined(), clang::NSAPI::isMacroDefined(), and clang::Preprocessor::isMacroDefinedInLocalModule().

◆ hasRevertedTokenIDToIdentifier()

bool clang::IdentifierInfo::hasRevertedTokenIDToIdentifier ( ) const
inline

True if revertTokenIDToIdentifier() was called.

Definition at line 316 of file IdentifierTable.h.

Referenced by isInterestingIdentifier().

◆ isCPlusPlusKeyword()

bool IdentifierInfo::isCPlusPlusKeyword ( const LangOptions LangOpts) const

Return true if this token is a C++ keyword in the specified language.

Returns true if the identifier represents a C++ keyword in the specified language.

Definition at line 360 of file IdentifierTable.cpp.

References isKeyword().

◆ isCPlusPlusOperatorKeyword()

bool clang::IdentifierInfo::isCPlusPlusOperatorKeyword ( ) const
inline

◆ isDeprecatedMacro()

bool clang::IdentifierInfo::isDeprecatedMacro ( ) const
inline

Definition at line 282 of file IdentifierTable.h.

Referenced by clang::Preprocessor::emitMacroExpansionWarnings().

◆ isEditorPlaceholder()

bool clang::IdentifierInfo::isEditorPlaceholder ( ) const
inline

Return true if this identifier is an editor placeholder.

Editor placeholders are produced by the code-completion engine and are represented as characters between '<#' and '#>' in the source code. An example of auto-completed call with a placeholder parameter is shown below:

function(<#int x#>);

Definition at line 538 of file IdentifierTable.h.

References getName().

Referenced by clang::Sema::ActOnIdExpression(), clang::Sema::BuildCXXNestedNameSpecifier(), and clang::Sema::DiagnoseUnknownTypeName().

◆ isExtensionToken()

bool clang::IdentifierInfo::isExtensionToken ( ) const
inline

get/setExtension - Initialize information about whether or not this language token is an extension.

This controls extension warnings, and is only valid if a custom token ID is set.

Definition at line 405 of file IdentifierTable.h.

Referenced by clang::Preprocessor::HandleIdentifier(), and clang::serialization::reader::ASTIdentifierLookupTrait::ReadData().

◆ isFinal()

bool clang::IdentifierInfo::isFinal ( ) const
inline

Definition at line 306 of file IdentifierTable.h.

◆ isFromAST()

bool clang::IdentifierInfo::isFromAST ( ) const
inline

Return true if the identifier in its current state was loaded from an AST file.

Definition at line 469 of file IdentifierTable.h.

Referenced by clang::Preprocessor::appendMacroDirective(), clang::Preprocessor::HandlePragmaPoison(), and markIdentifierFromAST().

◆ isFutureCompatKeyword()

bool clang::IdentifierInfo::isFutureCompatKeyword ( ) const
inline

is/setIsFutureCompatKeyword - Initialize information about whether or not this language token is a keyword in a newer or proposed Standard.

This controls compatibility warnings, and is only true when not parsing the corresponding Standard. Once a compatibility problem has been diagnosed with this keyword, the flag will be cleared.

Definition at line 419 of file IdentifierTable.h.

Referenced by clang::IdentifierTable::getFutureCompatDiagKind(), and clang::Preprocessor::HandleIdentifier().

◆ isHandleIdentifierCase()

bool clang::IdentifierInfo::isHandleIdentifierCase ( ) const
inline

Return true if the Preprocessor::HandleIdentifier must be called on a token of this identifier.

If this returns false, we know that HandleIdentifier will not affect the token.

Definition at line 465 of file IdentifierTable.h.

Referenced by clang::TokenLexer::Lex().

◆ isKeyword()

bool IdentifierInfo::isKeyword ( const LangOptions LangOpts) const

Return true if this token is a keyword in the specified language.

Returns true if the identifier represents a keyword in the specified language.

Definition at line 348 of file IdentifierTable.cpp.

References getTokenID(), and getTokenKwStatus().

Referenced by DiagnoseCallingConvCast(), highlightLines(), isConfigurationPattern(), isCPlusPlusKeyword(), clang::Token::isSimpleTypeSpecifier(), and shouldWarnOnMacroDef().

◆ isMangledOpenMPVariantName()

bool clang::IdentifierInfo::isMangledOpenMPVariantName ( ) const
inline

Determine whether this is the mangled name of an OpenMP variant.

Definition at line 524 of file IdentifierTable.h.

◆ isModulesImport()

bool clang::IdentifierInfo::isModulesImport ( ) const
inline

Determine whether this is the contextual keyword import.

Definition at line 512 of file IdentifierTable.h.

Referenced by clang::Preprocessor::HandleIdentifier().

◆ isOutOfDate()

bool clang::IdentifierInfo::isOutOfDate ( ) const
inline

Determine whether the information for this identifier is out of date with respect to the external source.

Definition at line 499 of file IdentifierTable.h.

Referenced by clang::HeaderFileInfo::getControllingMacro(), clang::Preprocessor::getLeafModuleMacros(), clang::Preprocessor::HandleIdentifier(), isTrivialSingleTokenExpansion(), and clang::ASTReader::ReadDefinedMacros().

◆ isPlaceholder()

bool clang::IdentifierInfo::isPlaceholder ( ) const
inline

◆ isPoisoned()

bool clang::IdentifierInfo::isPoisoned ( ) const
inline

◆ isReserved()

ReservedIdentifierStatus IdentifierInfo::isReserved ( const LangOptions LangOpts) const

◆ isReservedLiteralSuffixId()

ReservedLiteralSuffixIdStatus IdentifierInfo::isReservedLiteralSuffixId ( ) const

Determine whether this is a name reserved for future standardization or the implementation (C++ [usrlit.suffix]).

Definition at line 406 of file IdentifierTable.cpp.

References clang::ContainsDoubleUnderscore, getName(), clang::NotReserved, and clang::NotStartsWithUnderscore.

Referenced by clang::Sema::CheckLiteralOperatorDeclaration().

◆ isRestrictExpansion()

bool clang::IdentifierInfo::isRestrictExpansion ( ) const
inline

Definition at line 294 of file IdentifierTable.h.

Referenced by clang::Preprocessor::emitMacroExpansionWarnings().

◆ isStr() [1/2]

template<std::size_t StrLen>
bool clang::IdentifierInfo::isStr ( const char(&)  Str[StrLen]) const
inline

Return true if this is the identifier for the specified string.

This is intended to be used for string literals only: II->isStr("foo").

Definition at line 228 of file IdentifierTable.h.

Referenced by clang::SemaObjC::ActOnClassPropertyRefExpr(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartNamespaceDef(), clang::Sema::ActOnUsingDirective(), clang::ento::AnyFunctionCall::argumentsMayEscape(), clang::ento::ObjCMethodCall::argumentsMayEscape(), clang::ento::RetainSummaryManager::canEval(), checkFormatStringExpr(), diagnoseBadTypeAttribute(), DiagReservedModuleName(), EvaluateValue(), clang::findCapturingExpr(), clang::FunctionDecl::getMemoryFunctionKind(), handleAvailabilityAttr(), clang::SemaObjC::handleBridgeAttr(), handleLoopHintAttr(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Type::isAlignValT(), clang::AttributeCommonInfo::isClangScope(), IsDeclSourceLocationCurrent(), isEnableIf(), clang::AttributeCommonInfo::isGNUScope(), clang::TypoCorrection::isKeyword(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), isNamed(), clang::Type::isNothrowT(), isObjCProtectedMacro(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Type::isStdByteType(), IsStdFunction(), clang::DeclContext::isStdNamespace(), isWideStringLiteralFromMacro(), clang::Preprocessor::LexOnOffSwitch(), ParseAlignPragma(), clang::Parser::ParseOpenMPReservedLocator(), and clang::Parser::ParseOpenMPVarList().

◆ isStr() [2/2]

bool clang::IdentifierInfo::isStr ( llvm::StringRef  Str) const
inline

Return true if this is the identifier for the specified StringRef.

Definition at line 234 of file IdentifierTable.h.

◆ operator<()

bool clang::IdentifierInfo::operator< ( const IdentifierInfo RHS) const
inline

Provide less than operator for lexicographical sorting.

Definition at line 558 of file IdentifierTable.h.

References getName(), and getName().

◆ operator=() [1/2]

IdentifierInfo & clang::IdentifierInfo::operator= ( const IdentifierInfo )
delete

◆ operator=() [2/2]

IdentifierInfo & clang::IdentifierInfo::operator= ( IdentifierInfo &&  )
delete

◆ revertIdentifierToTokenID()

void clang::IdentifierInfo::revertIdentifierToTokenID ( tok::TokenKind  TK)
inline

Definition at line 329 of file IdentifierTable.h.

◆ revertTokenIDToIdentifier()

void clang::IdentifierInfo::revertTokenIDToIdentifier ( )
inline

Revert TokenID to tok::identifier; used for GNU libstdc++ 4.2 compatibility.

TokenID is normally read-only but there are 2 instances where we revert it to tok::identifier for libstdc++ 4.2. Keep track of when this happens using this method so we can inform serialization about it.

Definition at line 324 of file IdentifierTable.h.

Referenced by clang::serialization::reader::ASTIdentifierLookupTrait::ReadData().

◆ setBuiltinID()

void clang::IdentifierInfo::setBuiltinID ( unsigned  ID)
inline

Definition at line 368 of file IdentifierTable.h.

References ID.

Referenced by clang::ASTImporter::Import(), and clang::Builtin::Context::initializeBuiltins().

◆ setChangedSinceDeserialization()

void clang::IdentifierInfo::setChangedSinceDeserialization ( )
inline

Note that this identifier has changed since it was loaded from an AST file.

Definition at line 481 of file IdentifierTable.h.

Referenced by clang::Preprocessor::appendMacroDirective(), clang::Preprocessor::HandlePragmaPoison(), and markIdentifierFromAST().

◆ setFETokenInfo()

void clang::IdentifierInfo::setFETokenInfo ( void *  T)
inline

Definition at line 458 of file IdentifierTable.h.

References clang::T.

◆ setFETokenInfoChangedSinceDeserialization()

void clang::IdentifierInfo::setFETokenInfoChangedSinceDeserialization ( )
inline

Note that the frontend token information for this identifier has changed since it was loaded from an AST file.

Definition at line 493 of file IdentifierTable.h.

◆ setHasMacroDefinition()

void clang::IdentifierInfo::setHasMacroDefinition ( bool  Val)
inline

◆ setIsCPlusPlusOperatorKeyword()

void clang::IdentifierInfo::setIsCPlusPlusOperatorKeyword ( bool  Val = true)
inline

isCPlusPlusOperatorKeyword/setIsCPlusPlusOperatorKeyword controls whether this identifier is a C++ alternate representation of an operator.

Definition at line 443 of file IdentifierTable.h.

Referenced by AddCXXOperatorKeyword().

◆ setIsDeprecatedMacro()

void clang::IdentifierInfo::setIsDeprecatedMacro ( bool  Val)
inline

Definition at line 284 of file IdentifierTable.h.

◆ setIsExtensionToken()

void clang::IdentifierInfo::setIsExtensionToken ( bool  Val)
inline

Definition at line 406 of file IdentifierTable.h.

Referenced by AddKeyword().

◆ setIsFinal()

void clang::IdentifierInfo::setIsFinal ( bool  Val)
inline

Definition at line 308 of file IdentifierTable.h.

◆ setIsFromAST()

void clang::IdentifierInfo::setIsFromAST ( )
inline

Definition at line 471 of file IdentifierTable.h.

Referenced by markIdentifierFromAST().

◆ setIsFutureCompatKeyword()

void clang::IdentifierInfo::setIsFutureCompatKeyword ( bool  Val)
inline

Definition at line 420 of file IdentifierTable.h.

Referenced by AddKeyword(), and clang::Preprocessor::HandleIdentifier().

◆ setIsPoisoned()

void clang::IdentifierInfo::setIsPoisoned ( bool  Value = true)
inline

◆ setIsRestrictExpansion()

void clang::IdentifierInfo::setIsRestrictExpansion ( bool  Val)
inline

Definition at line 296 of file IdentifierTable.h.

◆ setMangledOpenMPVariantName()

void clang::IdentifierInfo::setMangledOpenMPVariantName ( bool  I)
inline

Set whether this is the mangled name of an OpenMP variant.

Definition at line 527 of file IdentifierTable.h.

Referenced by clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope().

◆ setModulesImport()

void clang::IdentifierInfo::setModulesImport ( bool  I)
inline

Set whether this identifier is the contextual keyword import.

Definition at line 515 of file IdentifierTable.h.

Referenced by clang::IdentifierTable::AddKeywords(), and clang::IdentifierTable::getOwn().

◆ setNotableIdentifierID()

void clang::IdentifierInfo::setNotableIdentifierID ( unsigned  ID)
inline

Definition at line 391 of file IdentifierTable.h.

References ID.

Referenced by AddNotableIdentifier().

◆ setObjCKeywordID()

void clang::IdentifierInfo::setObjCKeywordID ( tok::ObjCKeywordKind  ID)
inline

Definition at line 350 of file IdentifierTable.h.

References ID.

Referenced by AddObjCKeyword().

◆ setObjCOrBuiltinID()

void clang::IdentifierInfo::setObjCOrBuiltinID ( unsigned  ID)
inline

Definition at line 400 of file IdentifierTable.h.

References ID.

Referenced by clang::serialization::reader::ASTIdentifierLookupTrait::ReadData().

◆ setOutOfDate()

void clang::IdentifierInfo::setOutOfDate ( bool  OOD)
inline

Set whether the information for this identifier is out of date with respect to the external source.

Definition at line 503 of file IdentifierTable.h.

Referenced by clang::ASTReader::ReadAST().

Friends And Related Function Documentation

◆ IdentifierTable

friend class IdentifierTable
friend

Definition at line 118 of file IdentifierTable.h.


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