Lines Matching refs:PP

76                                      Preprocessor &PP);
101 bool ValueLive, Preprocessor &PP) {
106 PP.LexUnexpandedNonComment(PeekTok);
113 PP.LexUnexpandedNonComment(PeekTok);
117 if (PP.getCodeCompletionHandler())
118 PP.getCodeCompletionHandler()->CodeCompleteMacroName(false);
119 PP.setCodeCompletionReached();
120 PP.LexUnexpandedNonComment(PeekTok);
124 if (PP.CheckMacroName(PeekTok, MU_Other))
129 MacroDefinition Macro = PP.getMacroDefinition(II);
136 PP.markMacroAsUsed(Macro.getMacroInfo());
145 PP.LexUnexpandedNonComment(PeekTok);
148 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_after)
150 PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren;
154 PP.LexNonComment(PeekTok);
159 PP.LexNonComment(PeekTok);
182 PP.getSourceManager()
183 .getSLocEntry(PP.getSourceManager().getFileID(beginLoc))
202 PP.Diag(beginLoc, diag::warn_defined_in_function_type_macro);
204 PP.Diag(beginLoc, diag::warn_defined_in_object_type_macro);
208 if (PPCallbacks *Callbacks = PP.getPPCallbacks()) {
228 bool ValueLive, Preprocessor &PP) {
234 if (PP.getCodeCompletionHandler())
235 PP.getCodeCompletionHandler()->CodeCompletePreprocessorExpression();
236 PP.setCodeCompletionReached();
237 PP.LexNonComment(PeekTok);
248 return EvaluateDefined(Result, PeekTok, DT, ValueLive, PP);
255 PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II;
261 PP.LexNonComment(PeekTok);
265 PP.Diag(PeekTok, diag::err_pp_expr_bad_token_start_expr);
270 PP.Diag(PeekTok, diag::err_pp_expected_value_in_expr);
275 StringRef Spelling = PP.getSpelling(PeekTok, IntegerBuffer,
280 NumericLiteralParser Literal(Spelling, PeekTok.getLocation(), PP);
285 PP.Diag(PeekTok, diag::err_pp_illegal_floating_literal);
292 PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*integer*/1;
295 if (!PP.getLangOpts().C99 && Literal.isLongLong) {
296 if (PP.getLangOpts().CPlusPlus)
297 PP.Diag(PeekTok,
298 PP.getLangOpts().CPlusPlus11 ?
301 PP.Diag(PeekTok, diag::ext_c99_longlong);
308 PP.Diag(PeekTok, diag::err_integer_literal_too_large)
324 PP.Diag(PeekTok, diag::ext_integer_literal_too_large_for_signed);
331 PP.LexNonComment(PeekTok);
341 PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*character*/0;
345 StringRef ThisTok = PP.getSpelling(PeekTok, CharBuffer, &CharInvalid);
350 PeekTok.getLocation(), PP, PeekTok.getKind());
355 const TargetInfo &TI = PP.getTargetInfo();
376 Val.setIsUnsigned(!PP.getLangOpts().CharIsSigned);
388 PP.LexNonComment(PeekTok);
393 PP.LexNonComment(PeekTok); // Eat the (.
396 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
405 DT.IncludedUndefinedIds, PP))
409 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_rparen)
411 PP.Diag(Start, diag::note_matching) << tok::l_paren;
418 PP.LexNonComment(PeekTok); // Eat the ).
424 PP.LexNonComment(PeekTok);
425 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
432 PP.LexNonComment(PeekTok);
433 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
445 PP.Diag(Loc, diag::warn_pp_expr_overflow) << Result.getRange();
453 PP.LexNonComment(PeekTok);
454 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
466 PP.LexNonComment(PeekTok);
467 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true;
486 PP.LexNonComment(PeekTok);
527 static void diagnoseUnexpectedOperator(Preprocessor &PP, PPValue &LHS,
530 PP.Diag(LHS.getRange().getBegin(), diag::err_pp_expr_bad_token_lparen)
533 PP.Diag(Tok.getLocation(), diag::err_pp_expr_bad_token_binop)
546 Preprocessor &PP) {
550 diagnoseUnexpectedOperator(PP, LHS, PeekTok);
579 PP.LexNonComment(PeekTok);
584 if (EvaluateValue(RHS, PeekTok, DT, RHSIsLive, PP)) return true;
594 diagnoseUnexpectedOperator(PP, RHS, PeekTok);
617 IncludedUndefinedIds, PP))
640 PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 0
645 PP.Diag(OpLoc, diag::warn_pp_convert_to_positive) << 1
661 PP.Diag(OpLoc, diag::err_pp_remainder_by_zero)
673 PP.Diag(OpLoc, diag::err_pp_division_by_zero)
759 if (!PP.getLangOpts().C99 || ValueLive)
760 PP.Diag(OpLoc, diag::ext_pp_comma_expr)
767 PP.Diag(PeekTok.getLocation(), diag::err_expected)
769 PP.Diag(OpLoc, diag::note_matching) << tok::question;
773 PP.LexNonComment(PeekTok);
779 if (EvaluateValue(AfterColonVal, PeekTok, DT, AfterColonLive, PP))
786 IncludedUndefinedIds, PP))
803 PP.Diag(OpLoc, diag::err_pp_colon_without_question)
810 PP.Diag(OpLoc, diag::warn_pp_expr_overflow)