Lines Matching refs:PP

66 void EmptyPragmaHandler::HandlePragma(Preprocessor &PP,
101 void PragmaNamespace::HandlePragma(Preprocessor &PP,
105 PP.LexUnexpandedToken(Tok);
113 PP.Diag(Tok, diag::warn_pragma_ignored);
118 Handler->HandlePragma(PP, Introducer, Tok);
746 Preprocessor &PP, Token &Tok,
749 PP.LexUnexpandedToken(Tok);
751 StringLiteralParser Literal(Tok, PP);
755 PP.getIdentifierInfo(Literal.GetString()), Tok.getLocation());
760 PP.Diag(Tok.getLocation(), diag::err_pp_expected_module_name) << First;
767 Preprocessor &PP, Token &Tok,
772 if (LexModuleNameComponent(PP, Tok, NameComponent, ModuleName.empty()))
776 PP.LexUnexpandedToken(Tok);
976 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
978 PP.CheckEndOfDirective("pragma once");
979 PP.HandlePragmaOnce(OnceTok);
988 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
990 PP.HandlePragmaMark();
998 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1000 PP.HandlePragmaPoison();
1009 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1011 PP.HandlePragmaSystemHeader(SHToken);
1012 PP.CheckEndOfDirective("pragma");
1019 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1021 PP.HandlePragmaDependency(DepToken);
1028 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1031 PP.LexUnexpandedToken(Tok);
1033 PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid);
1039 if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash)
1044 if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash)
1047 if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash) {
1052 PP.EnterToken(Crasher, /*IsReinject*/ false);
1056 PP.LexUnexpandedToken(Identifier);
1064 PP.DiscardUntilEndOfDirective();
1065 PP.EnterToken(DumpAnnot, /*IsReinject*/false);
1067 PP.Diag(Identifier, diag::warn_pragma_debug_missing_argument)
1072 PP.LexUnexpandedToken(DiagName);
1074 PP.getDiagnostics().dump();
1076 StringLiteralParser Literal(DiagName, PP);
1079 PP.getDiagnostics().dump(Literal.GetString());
1081 PP.Diag(DiagName, diag::warn_pragma_debug_missing_argument)
1085 if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash)
1088 if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash)
1092 PP.LexUnexpandedToken(MacroName);
1095 PP.dumpMacroInfo(MacroII);
1097 PP.Diag(MacroName, diag::warn_pragma_debug_missing_argument)
1102 if (LexModuleName(PP, Tok, ModuleName))
1104 ModuleMap &MM = PP.getHeaderSearchInfo().getModuleMap();
1109 PP.Diag(IIAndLoc.second, diag::warn_pragma_debug_unknown_module)
1116 if (!PP.getPreprocessorOpts().DisablePragmaDebugCrash)
1119 HandleCaptured(PP);
1121 PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command)
1125 PPCallbacks *Callbacks = PP.getPPCallbacks();
1130 void HandleCaptured(Preprocessor &PP) {
1132 PP.LexUnexpandedToken(Tok);
1135 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol)
1142 PP.getPreprocessorAllocator().Allocate<Token>(1), 1);
1147 PP.EnterTokenStream(Toks, /*DisableMacroExpansion=*/true,
1173 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1177 PP.LexUnexpandedToken(Tok);
1179 PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid);
1183 PPCallbacks *Callbacks = PP.getPPCallbacks();
1186 if (!PP.getDiagnostics().popMappings(DiagLoc))
1187 PP.Diag(Tok, diag::warn_pragma_diagnostic_cannot_pop);
1192 PP.getDiagnostics().pushMappings(DiagLoc);
1206 PP.Diag(Tok, diag::warn_pragma_diagnostic_invalid);
1210 PP.LexUnexpandedToken(Tok);
1214 if (!PP.FinishLexStringLiteral(Tok, WarningName, "pragma diagnostic",
1219 PP.Diag(Tok.getLocation(), diag::warn_pragma_diagnostic_invalid_token);
1225 PP.Diag(StringLoc, diag::warn_pragma_diagnostic_invalid_option);
1237 PP.getDiagnostics().setSeverityForAll(Flavor, SV, DiagLoc);
1239 unknownDiag = PP.getDiagnostics().setSeverityForGroup(Flavor, Group, SV,
1242 PP.Diag(StringLoc, diag::warn_pragma_diagnostic_unknown_warning)
1252 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1254 PP.HandlePragmaHdrstop(DepToken);
1264 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1271 PPCallbacks *Callbacks = PP.getPPCallbacks();
1273 PP.Lex(Tok);
1275 PP.Diag(Tok, diag::warn_pragma_warning_expected) << "(";
1279 PP.Lex(Tok);
1285 PP.Lex(Tok);
1287 PP.Lex(Tok);
1290 PP.parseSimpleIntegerLiteral(Tok, Value))
1293 PP.Diag(Tok, diag::warn_pragma_warning_push_level);
1301 PP.Lex(Tok);
1310 PP.Diag(Tok, diag::warn_pragma_warning_spec_invalid);
1327 PP.Lex(Tok);
1331 Specifier = PP.getSpelling(Tok, SpecifierBuf);
1332 if (PP.parseSimpleIntegerLiteral(Tok, Value)) {
1340 PP.Diag(Tok, diag::warn_pragma_warning_spec_invalid);
1344 PP.Diag(Tok, diag::warn_pragma_warning_expected) << ":";
1350 PP.Lex(Tok);
1353 if (!PP.parseSimpleIntegerLiteral(Tok, Value) || Value == 0 ||
1355 PP.Diag(Tok, diag::warn_pragma_warning_expected_number);
1366 PP.Lex(Tok);
1371 PP.Diag(Tok, diag::warn_pragma_warning_expected) << ")";
1375 PP.Lex(Tok);
1377 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma warning";
1387 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1393 PPCallbacks *Callbacks = PP.getPPCallbacks();
1395 PP.Lex(Tok);
1397 PP.Diag(Tok, diag::warn_pragma_exec_charset_expected) << "(";
1401 PP.Lex(Tok);
1406 PP.Lex(Tok);
1408 PP.Lex(Tok);
1411 if (!PP.FinishLexStringLiteral(Tok, ExecCharset,
1418 PP.Diag(Tok, diag::warn_pragma_exec_charset_push_invalid) << ExecCharset;
1426 PP.Lex(Tok);
1430 PP.Diag(Tok, diag::warn_pragma_exec_charset_spec_invalid);
1435 PP.Diag(Tok, diag::warn_pragma_exec_charset_expected) << ")";
1439 PP.Lex(Tok);
1441 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma execution_character_set";
1449 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1451 PP.HandlePragmaIncludeAlias(IncludeAliasTok);
1492 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1495 PP.Lex(Tok);
1502 PP.Lex(Tok);
1508 PP.Diag(MessageLoc, diag::err_pragma_message_malformed) << Kind;
1513 if (!PP.FinishLexStringLiteral(Tok, MessageString, PragmaKind(Kind),
1519 PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;
1522 PP.Lex(Tok); // eat the r_paren.
1526 PP.Diag(Tok.getLocation(), diag::err_pragma_message_malformed) << Kind;
1531 PP.Diag(MessageLoc, (Kind == PPCallbacks::PMK_Error)
1536 if (PPCallbacks *Callbacks = PP.getPPCallbacks())
1548 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1555 if (LexModuleName(PP, Tok, ModuleName))
1559 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1563 PP.getModuleLoader().loadModule(ImportLoc, ModuleName, Module::Hidden,
1568 PP.makeModuleVisible(Imported, ImportLoc);
1569 PP.EnterAnnotationToken(SourceRange(ImportLoc, ModuleName.back().second),
1571 if (auto *CB = PP.getPPCallbacks())
1585 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1592 if (LexModuleName(PP, Tok, ModuleName))
1596 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1599 StringRef Current = PP.getLangOpts().CurrentModule;
1601 PP.Diag(ModuleName.front().second, diag::err_pp_module_begin_wrong_module)
1609 auto &HSI = PP.getHeaderSearchInfo();
1612 PP.Diag(ModuleName.front().second,
1619 PP.Diag(ModuleName[I].second, diag::err_pp_module_begin_no_submodule)
1628 PP.getLangOpts(), PP.getTargetInfo(), PP.getDiagnostics(), M)) {
1629 PP.Diag(BeginLoc, diag::note_pp_module_begin_here)
1635 PP.EnterSubmodule(M, BeginLoc, /*ForPragma*/true);
1636 PP.EnterAnnotationToken(SourceRange(BeginLoc, ModuleName.back().second),
1645 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1649 PP.LexUnexpandedToken(Tok);
1651 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1653 Module *M = PP.LeaveSubmodule(/*ForPragma*/true);
1655 PP.EnterAnnotationToken(SourceRange(Loc), tok::annot_module_end, M);
1657 PP.Diag(Loc, diag::err_pp_module_end_without_module_begin);
1665 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1667 PP.HandlePragmaModuleBuild(Tok);
1675 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1682 if (LexModuleName(PP, Tok, ModuleName))
1686 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1689 PP.getModuleLoader().loadModule(Loc, ModuleName, Module::Hidden,
1699 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1701 PP.HandlePragmaPushMacro(PushMacroTok);
1710 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1712 PP.HandlePragmaPopMacro(PopMacroTok);
1721 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1729 PP.LexUnexpandedToken(Tok);
1736 PP.Diag(Tok.getLocation(), diag::err_pp_arc_cf_code_audited_syntax);
1741 PP.LexUnexpandedToken(Tok);
1743 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1746 SourceLocation BeginLoc = PP.getPragmaARCCFCodeAuditedInfo().second;
1754 PP.Diag(Loc, diag::err_pp_double_begin_of_arc_cf_code_audited);
1755 PP.Diag(BeginLoc, diag::note_pragma_entered_here);
1761 PP.Diag(Loc, diag::err_pp_unmatched_end_of_arc_cf_code_audited);
1767 PP.setPragmaARCCFCodeAuditedInfo(NameTok.getIdentifierInfo(), NewLoc);
1776 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,
1784 PP.LexUnexpandedToken(Tok);
1791 PP.Diag(Tok.getLocation(), diag::err_pp_assume_nonnull_syntax);
1796 PP.LexUnexpandedToken(Tok);
1798 PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma";
1801 SourceLocation BeginLoc = PP.getPragmaAssumeNonNullLoc();
1805 PPCallbacks *Callbacks = PP.getPPCallbacks();
1810 PP.Diag(Loc, diag::err_pp_double_begin_of_assume_nonnull);
1811 PP.Diag(BeginLoc, diag::note_pragma_entered_here);
1819 PP.Diag(Loc, diag::err_pp_unmatched_end_of_assume_nonnull);
1827 PP.setPragmaAssumeNonNullLoc(NewLoc);
1845 void HandlePragma(Preprocessor &PP, PragmaIntroducer Introducer,