Home | History | Annotate | Download | only in Lex

Lines Matching defs:II

34 MacroInfo *Preprocessor::getInfoForMacro(IdentifierInfo *II) const {
35 assert(II->hasMacroDefinition() && "Identifier is not a macro!");
37 macro_iterator Pos = Macros.find(II);
40 getExternalSource()->LoadMacroDefinition(II);
41 Pos = Macros.find(II);
50 void Preprocessor::setMacroInfo(IdentifierInfo *II, MacroInfo *MI,
53 MI->setPreviousDefinition(Macros[II]);
54 Macros[II] = MI;
55 II->setHasMacroDefinition(true);
56 if (II->isFromAST() && !LoadedFromAST)
57 II->setChangedSinceDeserialization();
61 void Preprocessor::clearMacroInfo(IdentifierInfo *II) {
62 assert(II->hasMacroDefinition() && "Macro is not defined!");
63 assert(Macros[II]->getUndefLoc().isValid() && "Macro is still defined!");
64 II->setHasMacroDefinition(false);
65 if (II->isFromAST())
66 II->setChangedSinceDeserialization();
119 IdentifierInfo *II = MI->getReplacementToken(0).getIdentifierInfo();
122 if (II == 0) return true;
126 if (II->isOutOfDate())
127 PP.getExternalSource()->updateOutOfDateIdentifier(*II);
131 if (II->hasMacroDefinition() && PP.getMacroInfo(II)->isEnabled() &&
133 II != MacroIdent)
144 if (*I == II)
618 static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
620 StringRef Feature = II->getName();
747 static bool HasExtension(const Preprocessor &PP, const IdentifierInfo *II) {
748 if (HasFeature(PP, II))
758 StringRef Extension = II->getName();
789 static bool HasAttribute(const IdentifierInfo *II) {
790 StringRef Name = II->getName();
805 IdentifierInfo *II, Preprocessor &PP,
814 PP.Diag(Tok.getLocation(), diag::err_pp_missing_lparen) << II->getName();
861 PP.Diag(Tok.getLocation(), diag::err_pp_missing_rparen) << II->getName();
883 static bool EvaluateHasInclude(Token &Tok, IdentifierInfo *II,
885 return EvaluateHasIncludeCommon(Tok, II, PP, NULL);
891 IdentifierInfo *II, Preprocessor &PP) {
906 return EvaluateHasIncludeCommon(Tok, II, PP, Lookup);
913 IdentifierInfo *II = Tok.getIdentifierInfo();
914 assert(II && "Can't be a macro without id info!");
918 if (II == Ident_Pragma)
920 else if (II == Ident__pragma) // in non-MS mode this is null
932 if (II == Ident__LINE__) {
953 } else if (II == Ident__FILE__ || II == Ident__BASE_FILE__) {
960 if (II == Ident__BASE_FILE__ && PLoc.isValid()) {
979 } else if (II == Ident__DATE__) {
988 } else if (II == Ident__TIME__) {
997 } else if (II == Ident__INCLUDE_LEVEL__) {
1012 } else if (II == Ident__TIMESTAMP__) {
1035 } else if (II == Ident__COUNTER__) {
1039 } else if (II == Ident__has_feature ||
1040 II == Ident__has_extension ||
1041 II == Ident__has_builtin ||
1042 II == Ident__has_attribute) {
1067 else if (II == Ident__has_builtin) {
1070 } else if (II == Ident__has_attribute)
1072 else if (II == Ident__has_extension)
1075 assert(II == Ident__has_feature && "Must be feature check");
1082 } else if (II == Ident__has_include ||
1083 II == Ident__has_include_next) {
1088 if (II == Ident__has_include)
1089 Value = EvaluateHasInclude(Tok, II, *this);
1091 Value = EvaluateHasIncludeNext(Tok, II, *this);
1094 } else if (II == Ident__has_warning) {