Lines Matching refs:PP
59 Preprocessor &PP);
83 bool ValueLive, Preprocessor &PP) { in EvaluateDefined() argument
88 PP.LexUnexpandedNonComment(PeekTok); in EvaluateDefined()
95 PP.LexUnexpandedNonComment(PeekTok); in EvaluateDefined()
99 if (PP.getCodeCompletionHandler()) in EvaluateDefined()
100 PP.getCodeCompletionHandler()->CodeCompleteMacroName(false); in EvaluateDefined()
101 PP.setCodeCompletionReached(); in EvaluateDefined()
102 PP.LexUnexpandedNonComment(PeekTok); in EvaluateDefined()
106 if (PP.CheckMacroName(PeekTok, MU_Other)) in EvaluateDefined()
117 Macro = PP.getMacroDirective(II); in EvaluateDefined()
118 PP.markMacroAsUsed(Macro->getMacroInfo()); in EvaluateDefined()
128 PP.LexUnexpandedNonComment(PeekTok); in EvaluateDefined()
131 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_after) in EvaluateDefined()
133 PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren; in EvaluateDefined()
138 PP.LexNonComment(PeekTok); in EvaluateDefined()
142 PP.LexNonComment(PeekTok); in EvaluateDefined()
146 if (PPCallbacks *Callbacks = PP.getPPCallbacks()) { in EvaluateDefined()
150 MD = PP.getMacroDirective(II); in EvaluateDefined()
170 bool ValueLive, Preprocessor &PP) { in EvaluateValue() argument
174 if (PP.getCodeCompletionHandler()) in EvaluateValue()
175 PP.getCodeCompletionHandler()->CodeCompletePreprocessorExpression(); in EvaluateValue()
176 PP.setCodeCompletionReached(); in EvaluateValue()
177 PP.LexNonComment(PeekTok); in EvaluateValue()
186 return(EvaluateDefined(Result, PeekTok, DT, ValueLive, PP)); in EvaluateValue()
195 PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II; in EvaluateValue()
199 PP.LexNonComment(PeekTok); in EvaluateValue()
205 PP.Diag(PeekTok, diag::err_pp_expr_bad_token_start_expr); in EvaluateValue()
210 PP.Diag(PeekTok, diag::err_pp_expected_value_in_expr); in EvaluateValue()
215 StringRef Spelling = PP.getSpelling(PeekTok, IntegerBuffer, in EvaluateValue()
220 NumericLiteralParser Literal(Spelling, PeekTok.getLocation(), PP); in EvaluateValue()
225 PP.Diag(PeekTok, diag::err_pp_illegal_floating_literal); in EvaluateValue()
232 PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*integer*/1; in EvaluateValue()
235 if (!PP.getLangOpts().C99 && Literal.isLongLong) { in EvaluateValue()
236 if (PP.getLangOpts().CPlusPlus) in EvaluateValue()
237 PP.Diag(PeekTok, in EvaluateValue()
238 PP.getLangOpts().CPlusPlus11 ? in EvaluateValue()
241 PP.Diag(PeekTok, diag::ext_c99_longlong); in EvaluateValue()
248 PP.Diag(PeekTok, diag::err_integer_literal_too_large) in EvaluateValue()
264 PP.Diag(PeekTok, diag::ext_integer_literal_too_large_for_signed); in EvaluateValue()
271 PP.LexNonComment(PeekTok); in EvaluateValue()
281 PP.Diag(PeekTok, diag::err_pp_invalid_udl) << /*character*/0; in EvaluateValue()
285 StringRef ThisTok = PP.getSpelling(PeekTok, CharBuffer, &CharInvalid); in EvaluateValue()
290 PeekTok.getLocation(), PP, PeekTok.getKind()); in EvaluateValue()
295 const TargetInfo &TI = PP.getTargetInfo(); in EvaluateValue()
316 Val.setIsUnsigned(!PP.getLangOpts().CharIsSigned); in EvaluateValue()
328 PP.LexNonComment(PeekTok); in EvaluateValue()
333 PP.LexNonComment(PeekTok); // Eat the (. in EvaluateValue()
336 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true; in EvaluateValue()
344 if (EvaluateDirectiveSubExpr(Result, 1, PeekTok, ValueLive, PP)) in EvaluateValue()
348 PP.Diag(PeekTok.getLocation(), diag::err_pp_expected_rparen) in EvaluateValue()
350 PP.Diag(Start, diag::note_matching) << tok::l_paren; in EvaluateValue()
356 PP.LexNonComment(PeekTok); // Eat the ). in EvaluateValue()
362 PP.LexNonComment(PeekTok); in EvaluateValue()
363 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true; in EvaluateValue()
369 PP.LexNonComment(PeekTok); in EvaluateValue()
370 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true; in EvaluateValue()
381 PP.Diag(Loc, diag::warn_pp_expr_overflow) << Result.getRange(); in EvaluateValue()
389 PP.LexNonComment(PeekTok); in EvaluateValue()
390 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true; in EvaluateValue()
401 PP.LexNonComment(PeekTok); in EvaluateValue()
402 if (EvaluateValue(Result, PeekTok, DT, ValueLive, PP)) return true; in EvaluateValue()
464 Preprocessor &PP) { in EvaluateDirectiveSubExpr() argument
468 PP.Diag(PeekTok.getLocation(), diag::err_pp_expr_bad_token_binop) in EvaluateDirectiveSubExpr()
498 PP.LexNonComment(PeekTok); in EvaluateDirectiveSubExpr()
503 if (EvaluateValue(RHS, PeekTok, DT, RHSIsLive, PP)) return true; in EvaluateDirectiveSubExpr()
512 PP.Diag(PeekTok.getLocation(), diag::err_pp_expr_bad_token_binop) in EvaluateDirectiveSubExpr()
535 if (EvaluateDirectiveSubExpr(RHS, RHSPrec, PeekTok, RHSIsLive, PP)) in EvaluateDirectiveSubExpr()
558 PP.Diag(OpLoc, diag::warn_pp_convert_lhs_to_positive) in EvaluateDirectiveSubExpr()
563 PP.Diag(OpLoc, diag::warn_pp_convert_rhs_to_positive) in EvaluateDirectiveSubExpr()
579 PP.Diag(OpLoc, diag::err_pp_remainder_by_zero) in EvaluateDirectiveSubExpr()
591 PP.Diag(OpLoc, diag::err_pp_division_by_zero) in EvaluateDirectiveSubExpr()
675 if (!PP.getLangOpts().C99 || ValueLive) in EvaluateDirectiveSubExpr()
676 PP.Diag(OpLoc, diag::ext_pp_comma_expr) in EvaluateDirectiveSubExpr()
683 PP.Diag(PeekTok.getLocation(), diag::err_expected) in EvaluateDirectiveSubExpr()
685 PP.Diag(OpLoc, diag::note_matching) << tok::question; in EvaluateDirectiveSubExpr()
689 PP.LexNonComment(PeekTok); in EvaluateDirectiveSubExpr()
695 if (EvaluateValue(AfterColonVal, PeekTok, DT, AfterColonLive, PP)) in EvaluateDirectiveSubExpr()
701 PeekTok, AfterColonLive, PP)) in EvaluateDirectiveSubExpr()
718 PP.Diag(OpLoc, diag::err_pp_colon_without_question) in EvaluateDirectiveSubExpr()
725 PP.Diag(OpLoc, diag::warn_pp_expr_overflow) in EvaluateDirectiveSubExpr()