Home | History | Annotate | Download | only in Lex

Lines Matching full:identifier

437   // If this is a raw identifier or a literal token, set the pointer data.
548 /// identifier information for the token and install it into the token,
550 IdentifierInfo *Preprocessor::LookUpIdentifierInfo(Token &Identifier) const {
551 assert(Identifier.getRawIdentifierData() != 0 && "No raw identifier data!");
555 if (!Identifier.needsCleaning() && !Identifier.hasUCN()) {
557 II = getIdentifierInfo(StringRef(Identifier.getRawIdentifierData(),
558 Identifier.getLength()));
562 StringRef CleanedStr = getSpelling(Identifier, IdentifierBuffer);
564 if (Identifier.hasUCN()) {
573 // Update the token info (identifier info and appropriate token kind).
574 Identifier.setIdentifierInfo(II);
575 Identifier.setKind(II->getTokenID());
598 void Preprocessor::HandlePoisonedIdentifier(Token & Identifier) {
599 assert(Identifier.getIdentifierInfo() &&
600 "Can't handle identifiers without identifier info!");
602 PoisonReasons.find(Identifier.getIdentifierInfo());
604 Diag(Identifier, diag::err_pp_used_poisoned_id);
606 Diag(Identifier,it->second) << Identifier.getIdentifierInfo();
610 /// identifier. This callback looks up the identifier in the map and/or
617 void Preprocessor::HandleIdentifier(Token &Identifier) {
618 assert(Identifier.getIdentifierInfo() &&
619 "Can't handle identifiers without identifier info!");
621 IdentifierInfo &II = *Identifier.getIdentifierInfo();
623 // If the information about this identifier is out of date, update it from
634 Identifier.setKind(II.getTokenID());
640 // If this identifier was poisoned, and if it was not produced from a macro
643 HandlePoisonedIdentifier(Identifier);
650 if (!Identifier.isExpandDisabled() && MI->isEnabled()) {
651 if (!HandleMacroExpandedIdentifier(Identifier, MD))
657 Identifier.setFlag(Token::DisableExpand);
659 Diag(Identifier, diag::pp_disabled_macro_expansion);
664 // If this identifier is a keyword in C++11, produce a warning. Don't warn if
665 // we're not considering macro expansion, since this identifier might be the
670 Diag(Identifier, diag::warn_cxx11_keyword) << II.getName();
679 Identifier.setIdentifierInfo(0);
686 Diag(Identifier, diag::ext_token_used);
696 ModuleImportLoc = Identifier.getLocation();
714 // import identifier (. identifier)*
718 if (ModuleImportExpectsIdentifier && Result.getKind() == tok::identifier) {
719 // We expected to see an identifier here, and we did; continue handling
729 // see the next identifier.