Home | History | Annotate | Download | only in AST

Lines Matching defs:Diag

304     PartialDiagnostic *Diag;
307 explicit OptionalDiagnostic(PartialDiagnostic *Diag = 0) : Diag(Diag) {}
311 if (Diag)
312 *Diag << v;
317 if (Diag) {
320 *Diag << StringRef(Buffer.data(), Buffer.size());
326 if (Diag) {
329 *Diag << StringRef(Buffer.data(), Buffer.size());
417 Diag(Loc, diag::note_constexpr_call_limit_exceeded);
422 Diag(Loc, diag::note_constexpr_depth_limit_exceeded)
439 PartialDiagnostic &addDiag(SourceLocation Loc, diag::kind DiagId) {
441 Diag->push_back(std::make_pair(Loc, PD));
442 return EvalStatus.Diag->back().second;
450 OptionalDiagnostic Diag(SourceLocation Loc, diag::kind DiagId
451 = diag::note_invalid_subexpr_in_const_expr,
456 if (EvalStatus.Diag) {
465 EvalStatus.Diag->clear();
466 EvalStatus.Diag->reserve(1 + ExtraNotes + CallStackNotes);
470 return OptionalDiagnostic(&(*EvalStatus.Diag)[0].second);
476 OptionalDiagnostic Diag(const Expr *E, diag::kind DiagId
477 = diag::note_invalid_subexpr_in_const_expr,
479 if (EvalStatus.Diag)
480 return Diag(E->getExprLoc(), DiagId, ExtraNotes);
488 OptionalDiagnostic CCEDiag(LocArg Loc, diag::kind DiagId
489 = diag::note_invalid_subexpr_in_const_expr,
492 if (!EvalStatus.Diag || !EvalStatus.Diag->empty()) {
496 return Diag(Loc, DiagId, ExtraNotes);
500 OptionalDiagnostic Note(SourceLocation Loc, diag::kind DiagId) {
509 EvalStatus.Diag->insert(EvalStatus.Diag->end(),
518 EvalStatus.Diag && EvalStatus.Diag->empty();
527 : Enabled(Info.EvalStatus.Diag && Info.EvalStatus.Diag->empty() &&
532 if (Enabled && !Info.EvalStatus.Diag->empty() &&
534 Info.EvalStatus.Diag->clear();
549 Info.EvalStatus.Diag = NewDiag;
562 Info.CCEDiag(E, diag::note_constexpr_past_end_subobject)
573 Info.CCEDiag(E, diag::note_constexpr_array_index)
577 Info.CCEDiag(E, diag::note_constexpr_array_index)
640 addDiag(Frame->CallLoc, diag::note_constexpr_calls_suppressed)
649 addDiag(Frame->CallLoc, diag::note_constexpr_call_here) << Out.str();
736 Info.CCEDiag(E, diag::note_constexpr_null_subobject)
963 Info.Note(VD->getLocation(), diag::note_declared_at);
966 diag::note_constexpr_temporary_here);
985 Info.Diag(Loc, diag::note_constexpr_non_global, 1)
990 Info.Diag(Loc);
1014 Info.Diag(Loc, diag::note_constexpr_past_end, 1)
1030 Info.Diag(E, diag::note_constexpr_nonliteral)
1033 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1165 Info.Diag(E, diag::note_constexpr_overflow)
1250 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1263 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1367 Info.Diag(Loc);
1424 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1437 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1451 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1459 Info.Diag(E, diag::note_constexpr_var_init_non_constant,
1461 Info.Note(VD->getLocation(), diag::note_declared_at);
1465 Info.CCEDiag(E, diag::note_constexpr_var_init_non_constant,
1467 Info.Note(VD->getLocation(), diag::note_declared_at);
1521 Info.Diag(E, Info.getLangOpts().CPlusPlus0x ?
1522 (unsigned)diag::note_constexpr_read_past_end :
1523 (unsigned)diag::note_invalid_subexpr_in_const_expr);
1543 Info.Diag(E, Info.getLangOpts().CPlusPlus0x ?
1544 (unsigned)diag::note_constexpr_read_past_end :
1545 (unsigned)diag::note_invalid_subexpr_in_const_expr);
1565 Info.Diag(E, Info.getLangOpts().CPlusPlus0x ?
1566 (unsigned)diag::note_constexpr_read_past_end :
1567 (unsigned)diag::note_invalid_subexpr_in_const_expr);
1582 Info.Diag(E, diag::note_constexpr_ltor_mutable, 1)
1584 Info.Note(Field->getLocation(), diag::note_declared_at);
1594 Info.Diag(E, diag::note_constexpr_read_inactive_union_member)
1606 Info.Diag(E, diag::note_constexpr_ltor_volatile_obj, 1)
1608 Info.Note(Field->getLocation(), diag::note_declared_at);
1610 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1624 Info.Diag(E, diag::note_constexpr_read_uninit);
1718 Info.Diag(Conv, diag::note_invalid_subexpr_in_const_expr);
1726 Info.Diag(Conv, diag::note_constexpr_lifetime_ended, 1) << !Base;
1738 Info.Diag(Conv, diag::note_constexpr_ltor_volatile_type) << Type;
1740 Info.Diag(Conv);
1756 Info.Diag(Conv);
1765 Info.Diag(Conv, diag::note_constexpr_ltor_volatile_obj, 1) << 1 << VD;
1766 Info.Note(VD->getLocation(), diag::note_declared_at);
1768 Info.Diag(Conv);
1779 Info.Diag(Conv, diag::note_constexpr_ltor_non_const_int, 1) << VD;
1780 Info.Note(VD->getLocation(), diag::note_declared_at);
1782 Info.Diag(Conv);
1791 Info.CCEDiag(Conv, diag::note_constexpr_ltor_non_constexpr, 1) << VD;
1792 Info.Note(VD->getLocation(), diag::note_declared_at);
1799 Info.Diag(Conv, diag::note_constexpr_ltor_non_constexpr, 1) << VD;
1800 Info.Note(VD->getLocation(), diag::note_declared_at);
1802 Info.Diag(Conv);
1826 Info.Diag(Conv, diag::note_constexpr_lifetime_ended, 1) << !Base;
1838 Info.Diag(Conv, diag::note_constexpr_ltor_volatile_obj, 1) << 0;
1839 Info.Note(Base->getExprLoc(), diag::note_constexpr_temporary_here);
1841 Info.Diag(Conv);
1864 Info.Diag(Conv, diag::note_invalid_subexpr_in_const_expr);
1990 Info.CCEDiag(E, diag::note_constexpr_invalid_downcast)
2005 Info.CCEDiag(E, diag::note_constexpr_invalid_downcast)
2073 Info.CCEDiag(Loc, diag::note_constexpr_invalid_function, 1)
2075 Info.Note(CD->getLocation(), diag::note_declared_at);
2077 Info.CCEDiag(Loc, diag::note_invalid_subexpr_in_const_expr);
2102 Info.Diag(CallLoc, diag::note_constexpr_invalid_function, 1)
2105 Info.Note(DiagDecl->getLocation(), diag::note_declared_at);
2107 Info.Diag(CallLoc, diag::note_invalid_subexpr_in_const_expr);
2163 Info.Diag(CallLoc, diag::note_constexpr_virtual_base) << RD;
2398 llvm::SmallVector<PartialDiagnosticAt, 8> Diag;
2399 SpeculativeEvaluationRAII Speculate(Info, &Diag);
2402 if (Diag.empty())
2405 Diag.clear();
2407 if (Diag.empty())
2411 Error(E, diag::note_constexpr_conditional_never_const);
2433 OptionalDiagnostic CCEDiag(const Expr *E, diag::kind D) {
2446 bool Error(const Expr *E, diag::kind D) {
2447 Info.Diag(E, D);
2451 return Error(E, diag::note_invalid_subexpr_in_const_expr);
2481 CCEDiag(E, diag::note_constexpr_invalid_cast) << 0;
2485 CCEDiag(E, diag::note_constexpr_invalid_cast) << 1;
2633 return Error(E, diag::note_constexpr_virtual_call);
2888 this->CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
2974 Info.Diag(E, diag::note_constexpr_typeid_polymorphic)
3153 CCEDiag(E, diag::note_constexpr_invalid_cast)
3156 CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
3195 CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
3428 Info.Diag(E, diag::note_constexpr_virtual_base) << RD;
4132 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
4355 Info.CCEDiag(E, diag::note_constexpr_invalid_function)
4358 Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
4490 Info.EvalStatus.Diag = 0;
4546 bool Error(const Expr *E, diag::kind D) {
4550 OptionalDiagnostic CCEDiag(const Expr *E, diag::kind D) {
4735 return Error(E, diag::note_expr_divide_by_zero);
4747 CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;
4757 CCEDiag(E, diag::note_constexpr_large_shift)
4763 CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS;
4765 CCEDiag(E, diag::note_constexpr_lshift_discards);
4774 CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;
4784 CCEDiag(E, diag::note_constexpr_large_shift)
5007 CCEDiag(E, diag::note_constexpr_pointer_subtraction_not_same_array);
5047 CCEDiag(E, diag::note_constexpr_void_comparison);
5074 CCEDiag(E, diag::note_constexpr_pointer_comparison_base_classes);
5076 CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field)
5080 CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field)
5085 CCEDiag(E, diag::note_constexpr_pointer_comparison_differing_access)
5151 CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;
5154 CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;
5448 CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
5721 CCEDiag(E, diag::note_constexpr_float_arithmetic) << Result.isNaN();
6072 return Error(E, diag::note_expr_divide_by_zero);
6225 Info.CCEDiag(E, diag::note_constexpr_nonliteral)
6228 Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
6232 Info.Diag(E, diag::note_constexpr_nonliteral) << E->getType();
6235 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
6352 EStatus.Diag = &Notes;
6873 Status.Diag = &Diags;
6900 Status.Diag = &Diags;