Home | History | Annotate | Download | only in AST

Lines Matching defs:Diag

347     PartialDiagnostic *Diag;
350 explicit OptionalDiagnostic(PartialDiagnostic *Diag = nullptr)
351 : Diag(Diag) {}
355 if (Diag)
356 *Diag << v;
361 if (Diag) {
364 *Diag << StringRef(Buffer.data(), Buffer.size());
370 if (Diag) {
382 *Diag << StringRef(Buffer.data(), Buffer.size());
532 Diag(Loc, diag::note_constexpr_call_limit_exceeded);
537 Diag(Loc, diag::note_constexpr_depth_limit_exceeded)
554 Diag(S->getLocStart(), diag::note_constexpr_step_limit_exceeded);
563 PartialDiagnostic &addDiag(SourceLocation Loc, diag::kind DiagId) {
565 EvalStatus.Diag->push_back(std::make_pair(Loc, PD));
566 return EvalStatus.Diag->back().second;
574 OptionalDiagnostic Diag(SourceLocation Loc, diag::kind DiagId
575 = diag::note_invalid_subexpr_in_const_expr,
577 if (EvalStatus.Diag) {
584 if (!EvalStatus.Diag->empty()) {
610 EvalStatus.Diag->clear();
611 EvalStatus.Diag->reserve(1 + ExtraNotes + CallStackNotes);
615 return OptionalDiagnostic(&(*EvalStatus.Diag)[0].second);
621 OptionalDiagnostic Diag(const Expr *E, diag::kind DiagId
622 = diag::note_invalid_subexpr_in_const_expr,
624 if (EvalStatus.Diag)
625 return Diag(E->getExprLoc(), DiagId, ExtraNotes);
636 OptionalDiagnostic CCEDiag(LocArg Loc, diag::kind DiagId
637 = diag::note_invalid_subexpr_in_const_expr,
641 if (!EvalStatus.Diag || !EvalStatus.Diag->empty()) {
645 return Diag(Loc, DiagId, ExtraNotes);
649 OptionalDiagnostic Note(SourceLocation Loc, diag::kind DiagId) {
658 EvalStatus.Diag->insert(EvalStatus.Diag->end(),
720 HadNoPriorDiags(Info.EvalStatus.Diag &&
721 Info.EvalStatus.Diag->empty() &&
731 if (Enabled && HadNoPriorDiags && !Info.EvalStatus.Diag->empty() &&
733 Info.EvalStatus.Diag->clear();
748 Info.EvalStatus.Diag = NewDiag;
800 Info.CCEDiag(E, diag::note_constexpr_past_end_subobject)
811 Info.CCEDiag(E, diag::note_constexpr_array_index)
815 Info.CCEDiag(E, diag::note_constexpr_array_index)
862 addDiag(Frame->CallLoc, diag::note_constexpr_calls_suppressed)
871 addDiag(Frame->CallLoc, diag::note_constexpr_call_here) << Out.str();
958 Info.CCEDiag(E, diag::note_constexpr_null_subobject)
1236 Info.Note(VD->getLocation(), diag::note_declared_at);
1239 diag::note_constexpr_temporary_here);
1258 Info.Diag(Loc, diag::note_constexpr_non_global, 1)
1263 Info.Diag(Loc);
1313 Info.Diag(Loc, diag::note_constexpr_past_end, 1)
1337 Info.Diag(E, diag::note_constexpr_nonliteral)
1340 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1350 Info.Diag(DiagLoc, diag::note_constexpr_uninitialized)
1480 Info.CCEDiag(E, diag::note_constexpr_overflow)
1543 Info.Diag(E);
1585 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1598 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1617 diag::warn_integer_constant_overflow)
1631 Info.Diag(E);
1651 Info.Diag(E, diag::note_expr_divide_by_zero);
1669 Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;
1678 Info.CCEDiag(E, diag::note_constexpr_large_shift)
1684 Info.CCEDiag(E, diag::note_constexpr_lshift_of_negative) << LHS;
1686 Info.CCEDiag(E, diag::note_constexpr_lshift_discards);
1700 Info.CCEDiag(E, diag::note_constexpr_negative_shift) << RHS;
1709 Info.CCEDiag(E, diag::note_constexpr_large_shift)
1730 Info.Diag(E);
1747 Info.CCEDiag(E, diag::note_constexpr_float_arithmetic) << LHS.isNaN();
1873 Info.Diag(Loc);
1937 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1957 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1971 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
1979 Info.Diag(E, diag::note_constexpr_var_init_non_constant,
1981 Info.Note(VD->getLocation(), diag::note_declared_at);
1985 Info.CCEDiag(E, diag::note_constexpr_var_init_non_constant,
1987 Info.Note(VD->getLocation(), diag::note_declared_at);
2112 Info.Diag(E, diag::note_constexpr_access_past_end)
2115 Info.Diag(E);
2127 Info.Diag(E, diag::note_constexpr_access_uninit) << handler.AccessKind;
2154 Info.Diag(E, diag::note_constexpr_access_past_end)
2157 Info.Diag(E);
2187 Info.Diag(E, diag::note_constexpr_access_past_end)
2190 Info.Diag(E);
2210 Info.Diag(E, diag::note_constexpr_ltor_mutable, 1)
2212 Info.Note(Field->getLocation(), diag::note_declared_at);
2222 Info.Diag(E, diag::note_constexpr_access_inactive_union_member)
2238 Info.Diag(E, diag::note_constexpr_access_volatile_obj, 1)
2240 Info.Note(Field->getLocation(), diag::note_declared_at);
2242 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
2314 Info.Diag(E, diag::note_constexpr_modify_const_type) << QT;
2333 Info.Diag(E);
2423 Info.Diag(E, diag::note_constexpr_access_null) << AK;
2431 Info.Diag(E, diag::note_constexpr_lifetime_ended, 1)
2444 Info.Diag(E, diag::note_constexpr_access_volatile_type)
2447 Info.Diag(E);
2469 Info.Diag(E);
2476 Info.Diag(E, diag::note_constexpr_access_volatile_obj, 1)
2478 Info.Note(VD->getLocation(), diag::note_declared_at);
2480 Info.Diag(E);
2495 Info.Diag(E, diag::note_constexpr_modify_global);
2502 Info.Diag(E, diag::note_constexpr_ltor_non_const_int, 1) << VD;
2503 Info.Note(VD->getLocation(), diag::note_declared_at);
2505 Info.Diag(E);
2514 Info.CCEDiag(E, diag::note_constexpr_ltor_non_constexpr, 1) << VD;
2515 Info.Note(VD->getLocation(), diag::note_declared_at);
2522 Info.Diag(E, diag::note_constexpr_ltor_non_constexpr, 1) << VD;
2523 Info.Note(VD->getLocation(), diag::note_declared_at);
2525 Info.Diag(E);
2561 Info.Diag(E, diag::note_constexpr_access_static_temporary, 1) << AK;
2562 Info.Note(MTE->getExprLoc(), diag::note_constexpr_temporary_here);
2569 Info.Diag(E);
2580 Info.Diag(E, diag::note_constexpr_access_volatile_obj, 1)
2582 Info.Note(Base->getExprLoc(), diag::note_constexpr_temporary_here);
2584 Info.Diag(E);
2638 Info.Diag(Conv);
2667 Info.Diag(E);
2695 Info.Diag(E, diag::note_constexpr_modify_const_type) << QT;
2711 Info.Diag(E);
2717 Info.Diag(E);
2728 Info.Diag(E);
2756 Info.Diag(E);
2788 Info.Diag(E);
2810 Info.Diag(E, diag::note_constexpr_modify_const_type) << QT;
2842 Info.Diag(E);
2853 Info.Diag(E);
2912 Info.Diag(E);
2937 Info.Diag(E);
2959 Info.Diag(Object, diag::note_constexpr_nonliteral) << Object->getType();
2987 Info.Diag(RHS);
2997 Info.Diag(RHS);
3007 Info.Diag(RHS);
3088 Info.CCEDiag(E, diag::note_constexpr_invalid_downcast)
3103 Info.CCEDiag(E, diag::note_constexpr_invalid_downcast)
3141 Info.Diag(D->getLocStart(), diag::note_constexpr_uninitialized)
3244 Info.Diag(Found->getLocStart(), diag::note_constexpr_stmt_expr_unsupported);
3335 Info.Diag(S->getLocStart());
3542 Info.CCEDiag(Loc, diag::note_constexpr_invalid_function, 1)
3544 Info.Note(CD->getLocation(), diag::note_declared_at);
3546 Info.CCEDiag(Loc, diag::note_invalid_subexpr_in_const_expr);
3576 Info.Diag(CallLoc, diag::note_constexpr_invalid_function, 1)
3579 Info.Note(DiagDecl->getLocation(), diag::note_declared_at);
3581 Info.Diag(CallLoc, diag::note_invalid_subexpr_in_const_expr);
3645 Info.Diag(Callee->getLocEnd(), diag::note_constexpr_no_return);
3664 Info.Diag(CallLoc, diag::note_constexpr_virtual_base) << RD;
3809 SmallVector<PartialDiagnosticAt, 8> Diag;
3810 SpeculativeEvaluationRAII Speculate(Info, &Diag);
3813 if (Diag.empty())
3816 Diag.clear();
3818 if (Diag.empty())
3822 Error(E, diag::note_constexpr_conditional_never_const);
3844 OptionalDiagnostic CCEDiag(const Expr *E, diag::kind D) {
3857 bool Error(const Expr *E, diag::kind D) {
3858 Info.Diag(E, D);
3862 return Error(E, diag::note_invalid_subexpr_in_const_expr);
3898 CCEDiag(E, diag::note_constexpr_invalid_cast) << 0;
3902 CCEDiag(E, diag::note_constexpr_invalid_cast) << 1;
4048 return Error(E, diag::note_constexpr_virtual_call);
4173 Info.Diag((*BI)->getLocStart(),
4174 diag::note_constexpr_stmt_expr_unsupported);
4187 Info.Diag((*BI)->getLocStart(),
4188 diag::note_constexpr_stmt_expr_unsupported);
4368 this->CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
4419 Info.Diag(E, diag::note_constexpr_use_uninit_reference);
4503 Info.Diag(E, diag::note_constexpr_typeid_polymorphic)
4671 Info.Diag(E, diag::note_constexpr_this) << E->isImplicit();
4673 Info.Diag(E);
4739 CCEDiag(E, diag::note_constexpr_invalid_cast)
4742 CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
4771 CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
5015 Info.Diag(E, diag::note_constexpr_virtual_base) << RD;
5813 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
6170 Info.CCEDiag(E, diag::note_constexpr_invalid_function)
6173 Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
6313 Info.EvalStatus.Diag = nullptr;
6369 bool Error(const Expr *E, diag::kind D) {
6373 OptionalDiagnostic CCEDiag(const Expr *E, diag::kind D) {
6755 CCEDiag(E, diag::note_constexpr_pointer_subtraction_not_same_array);
6768 Info.Diag(E, diag::note_constexpr_pointer_subtraction_zero_size)
6804 CCEDiag(E, diag::note_constexpr_void_comparison);
6831 CCEDiag(E, diag::note_constexpr_pointer_comparison_base_classes);
6833 CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field)
6837 CCEDiag(E, diag::note_constexpr_pointer_comparison_base_field)
6842 CCEDiag(E, diag::note_constexpr_pointer_comparison_differing_access)
6908 CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;
6911 CCEDiag(E, diag::note_constexpr_compare_virtual_mem_ptr) << MD;
7215 CCEDiag(E, diag::note_constexpr_invalid_cast) << 2;
7826 return Error(E, diag::note_expr_divide_by_zero);
8022 Info.CCEDiag(E, diag::note_constexpr_nonliteral)
8030 Info.Diag(E, diag::note_constexpr_nonliteral) << E->getType();
8033 Info.Diag(E, diag::note_invalid_subexpr_in_const_expr);
8174 EStatus.Diag = &Notes;
8211 SmallVectorImpl<PartialDiagnosticAt> *Diag) const {
8213 EvalResult.Diag = Diag;
8713 Status.Diag = &Diags;
8762 Status.Diag = &Diags;
8798 Status.Diag = &Diags;