Diagnose certain constraint errors as hard errors, but otherwise treat them the same as normal SFINAE-type errors. 2019-11-27 Andrew Sutton <asutton@lock3software.com> Diagnose certain constraint errors as hard errors, but otherwise treat them the same as normal SFINAE-type errors. Also, generally clean up the satisfaction functions. gcc/cp/ * constexpr.c (cxx_eval_constant_expression): Use evaluate_concept_check. * constraint.cc (normalize_concept_definition): Accept a diagnostic flag and only cache when not diagnosing errors. (decl_satisfied_cache): Map to trees instead of bools. (satisfy_atom): Guarantee a location for the errors, propagate complain flags to force_rvalue, and emit errors for non-boolean constraints. (get_normalized_constraints_and_args): New overloads. Factored out of satisfy_constraint_expression and satisfy_declaration_constraints. (satisfy_constraint_expression): Propagate diagnostic info to normalization. (satisfy_declaration_constraints): New. Factored out of constraints_satisfied_p. (constraint_satisfaction_value): New. Calls satisfy_constraint_expression or satisfy_declaration_constraints. (constraints_satisfied_p): Call constraint_satisfaction_value. (evaluate_concept_check): Don't take tsubst_falgs_t. Replay satisfaction if an error is encountered. (current_failed_constraint): Moved from pt.c. (diagnose_constraints): Call constraint_satisfaction_value. * cp-tree.h: Update declarations. * pt.c (current_failed_constraint): Moved to constraint.cc. * semantics.c (finish_id_expression_1): Remove a duplicate case. gcc/testsuite/ * g++.dg/concepts/pr84330.C: Update diagnostics. * g++.dg/cpp2a/concepts-requires2.C: Likewise. From-SVN: r278768
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| abbrev1.C | Loading commit data... | |
| abbrev2.C | Loading commit data... | |
| auto1.C | Loading commit data... | |
| auto3.C | Loading commit data... | |
| auto4.C | Loading commit data... | |
| class-deduction1.C | Loading commit data... | |
| class5.C | Loading commit data... | |
| class6.C | Loading commit data... | |
| debug1.C | Loading commit data... | |
| decl-diagnose.C | Loading commit data... | |
| deduction-constraint1.C | Loading commit data... | |
| diagnostic1.C | Loading commit data... | |
| dr1430.C | Loading commit data... | |
| equiv.C | Loading commit data... | |
| equiv2.C | Loading commit data... | |
| expression.C | Loading commit data... | |
| expression2.C | Loading commit data... | |
| expression3.C | Loading commit data... | |
| fn-concept1.C | Loading commit data... | |
| fn-concept2.C | Loading commit data... | |
| fn-generic-member-ool.C | Loading commit data... | |
| fn1.C | Loading commit data... | |
| fn10.C | Loading commit data... | |
| fn2.C | Loading commit data... | |
| fn3.C | Loading commit data... | |
| fn4.C | Loading commit data... | |
| fn5.C | Loading commit data... | |
| fn6.C | Loading commit data... | |
| fn7.C | Loading commit data... | |
| fn8.C | Loading commit data... | |
| fn9.C | Loading commit data... | |
| generic-fn-err.C | Loading commit data... | |
| generic-fn.C | Loading commit data... | |
| inherit-ctor1.C | Loading commit data... | |
| inherit-ctor3.C | Loading commit data... | |
| intro1.C | Loading commit data... | |
| intro2.C | Loading commit data... | |
| intro3.C | Loading commit data... | |
| intro4.C | Loading commit data... | |
| intro5.C | Loading commit data... | |
| intro6.C | Loading commit data... | |
| intro7.C | Loading commit data... | |
| locations1.C | Loading commit data... | |
| no-bool1.C | Loading commit data... | |
| partial-concept-id1.C | Loading commit data... | |
| partial-concept-id2.C | Loading commit data... | |
| partial-spec5.C | Loading commit data... | |
| placeholder2.C | Loading commit data... | |
| placeholder3.C | Loading commit data... | |
| placeholder4.C | Loading commit data... | |
| placeholder5.C | Loading commit data... | |
| placeholder6.C | Loading commit data... | |
| pr65634.C | Loading commit data... | |
| pr65636.C | Loading commit data... | |
| pr65681.C | Loading commit data... | |
| pr65848.C | Loading commit data... | |
| pr67249.C | Loading commit data... | |
| pr67544.C | Loading commit data... | |
| pr67595.C | Loading commit data... | |
| pr67655.C | Loading commit data... | |
| pr67656.C | Loading commit data... | |
| pr68434.C | Loading commit data... | |
| pr71127.C | Loading commit data... | |
| pr71128.C | Loading commit data... | |
| pr71131.C | Loading commit data... | |
| pr71385.C | Loading commit data... | |
| pr84330.C | Loading commit data... | |
| pr84423-1.C | Loading commit data... | |
| pr84423-2.C | Loading commit data... | |
| pr84661.C | Loading commit data... | |
| pr85065.C | Loading commit data... | |
| pr87768.C | Loading commit data... | |
| pr89036.C | Loading commit data... | |
| template-parm11.C | Loading commit data... | |
| template-parm12.C | Loading commit data... | |
| template-parm2.C | Loading commit data... | |
| template-parm3.C | Loading commit data... | |
| template-parm4.C | Loading commit data... | |
| template-template-parm1.C | Loading commit data... | |
| var-concept1.C | Loading commit data... | |
| var-concept2.C | Loading commit data... | |
| var-concept3.C | Loading commit data... | |
| var-concept4.C | Loading commit data... | |
| var-concept5.C | Loading commit data... | |
| var-concept6.C | Loading commit data... | |
| var-concept7.C | Loading commit data... | |
| var-templ1.C | Loading commit data... | |
| var-templ2.C | Loading commit data... | |
| var-templ3.C | Loading commit data... | |
| variadic1.C | Loading commit data... | |
| variadic2.C | Loading commit data... | |
| variadic3.C | Loading commit data... | |
| variadic4.C | Loading commit data... |