Lines Matching defs:PP
78 Preprocessor &PP);
103 bool ValueLive, Preprocessor &PP) {
108 PP.LexUnexpandedNonComment(PeekTok);
115 PP.LexUnexpandedNonComment(PeekTok);
119 if (PP.getCodeCompletionHandler())
120 PP.getCodeCompletionHandler()->CodeCompleteMacroName(false);
121 PP.setCodeCompletionReached();
122 PP.LexUnexpandedNonComment(PeekTok);
126 if (PP.CheckMacroName(PeekTok, MU_Other))
131 MacroDefinition Macro = PP.getMacroDefinition(II);
136 PP.emitMacroExpansionWarnings(
142 PP.markMacroAsUsed(Macro.getMacroInfo());
151 PP.LexUnexpandedNonComment(PeekTok);
154 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_after)
156 PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;
160 PP.LexNonComment(PeekTok);
165 PP.LexNonComment(PeekTok);
188 PP.getSourceManager()
189 .getSLocEntry(PP.getSourceManager().getFileID(beginLoc))
208 PP.Diag(beginLoc, diag::warn_defined_in_function_type_macro);
210 PP.Diag(beginLoc, diag::warn_defined_in_object_type_macro);
214 if (PPCallbacks *Callbacks = PP.getPPCallbacks()) {
234 bool ValueLive, Preprocessor &PP) {
240 if (PP.getCodeCompletionHandler())
241 PP.getCodeCompletionHandler()->CodeCompletePreprocessorExpression();
242 PP.setCodeCompletionReached();
243 PP.LexNonComment(PeekTok);
254 return EvaluateDefined(Result, PeekTok, DT, ValueLive, PP);
261 PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II;
263 const DiagnosticsEngine &DiagEngine = PP.getDiagnostics();
274 PP.Diag(PeekTok, diag::warn_pp_undef_prefix)
283 PP.LexNonComment(PeekTok);
287 PP.Diag(PeekTok, diag::err_pp_expr_bad_token_start_expr);
292 PP.Diag(PeekTok, diag::err_pp_expected_value_in_expr);
297 StringRef Spelling = PP.getSpelling(PeekTok, IntegerBuffer,
303 PP.getSourceManager(), PP.getLangOpts(),
304 PP.getTargetInfo(), PP.getDiagnostics());
309 PP.Diag(PeekTok, diag::err_pp_illegal_floating_literal);
316 PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*integer*/1;
319 if (!PP.getLangOpts().C99 && Literal.isLongLong) {
320 if (PP.getLangOpts().CPlusPlus)
321 PP.Diag(PeekTok,
322 PP.getLangOpts().CPlusPlus11 ?
325 PP.Diag(PeekTok, diag::ext_c99_longlong);
330 PP.Diag(PeekTok, PP.getLangOpts().CPlusPlus
331 ? PP.getLangOpts().CPlusPlus23
339 PP.Diag(PeekTok, PP.getLangOpts().CPlusPlus ? diag::ext_cxx_bitint_suffix
340 : PP.getLangOpts().C23
348 PP.Diag(PeekTok, diag::err_integer_literal_too_large)
364 PP.Diag(PeekTok, diag::ext_integer_literal_too_large_for_signed);
371 PP.LexNonComment(PeekTok);
381 PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*character*/0;
385 StringRef ThisTok = PP.getSpelling(PeekTok, CharBuffer, &CharInvalid);
390 PeekTok.getLocation(), PP, PeekTok.getKind());
395 const TargetInfo &TI = PP.getTargetInfo();
419 if (PP.getLangOpts().CPlusPlus)
421 PP.getLangOpts().Char8 ? true : !PP.getLangOpts().CharIsSigned);
425 Val.setIsUnsigned(!PP.getLangOpts().CharIsSigned);
437 PP.LexNonComment(PeekTok);
442 PP.LexNonComment(PeekTok); // Eat the (.
445 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
454 DT.IncludedUndefinedIds, PP))
458 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_rparen)
460 PP.Diag(Start, diag::note_matching) << tok::l_paren;
467 PP.LexNonComment(PeekTok); // Eat the ).
473 PP.LexNonComment(PeekTok);
474 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
481 PP.LexNonComment(PeekTok);
482 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
494 PP.Diag(Loc, diag::warn_pp_expr_overflow) << Result.getRange();
502 PP.LexNonComment(PeekTok);
503 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
515 PP.LexNonComment(PeekTok);
516 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
535 PP.LexNonComment(PeekTok);
576 static void diagnoseUnexpectedOperator(Preprocessor &PP, PPValue &LHS,
579 PP.Diag(LHS.getRange().getBegin(), diag::err_pp_expr_bad_token_lparen)
582 PP.Diag(Tok.getLocation(), diag::err_pp_expr_bad_token_binop)
595 Preprocessor &PP) {
599 diagnoseUnexpectedOperator(PP, LHS, PeekTok);
628 PP.LexNonComment(PeekTok);
633 if (EvaluateValue(RHS, PeekTok, DT, RHSIsLive, PP)) return true;
643 diagnoseUnexpectedOperator(PP, RHS, PeekTok);
666 IncludedUndefinedIds, PP))
689 PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 0
694 PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 1
710 PP.Diag(OpLoc, diag::err_pp_remainder_by_zero)
722 PP.Diag(OpLoc, diag::err_pp_division_by_zero)
808 if (!PP.getLangOpts().C99 || ValueLive)
809 PP.Diag(OpLoc, diag::ext_pp_comma_expr)
816 PP.Diag(PeekTok.getLocation(), diag::err_expected)
818 PP.Diag(OpLoc, diag::note_matching) << tok::question;
822 PP.LexNonComment(PeekTok);
828 if (EvaluateValue(AfterColonVal, PeekTok, DT, AfterColonLive, PP))
835 IncludedUndefinedIds, PP))
852 PP.Diag(OpLoc, diag::err_pp_colon_without_question)
859 PP.Diag(OpLoc, diag::warn_pp_expr_overflow)