Page MenuHomePhabricator

[Concepts] Constraint enforcement and diagnostics
Needs ReviewPublic

Authored by saar.raz on Dec 24 2017, 1:13 PM.

Details

Summary
  • Associated constraints (requires clauses, currently) are now enforced when instantiating/specializing templates and when considering partial specializations and function overloads.
  • Elaborated diagnostics give helpful insight as to why the constraints were not satisfied.

This patch depends upon D41284

Diff Detail

Event Timeline

saar.raz created this revision.Dec 24 2017, 1:13 PM
saar.raz updated this revision to Diff 129306.Jan 10 2018, 10:39 AM
  • Better handling of diagnostics in ConceptSpecializationExprs, correctly written to and read from module files.
  • Modified Error messages according to some user feedback

Updating D41569: Summary:

Constraint enforcement and diagnostics

saar.raz updated this revision to Diff 132576.Feb 2 2018, 6:10 AM
  • When a conjunction constraint expression has both sides false, both sides will now be diagnosed.

Updating D41569: Summary:

Constraint enforcement and diagnostics

saar.raz updated this revision to Diff 137907.Mar 10 2018, 4:02 AM

Fixed crash caused by substitution of pack expansion into non-pack parameters in constraint expressions.

Updating D41569: Summary:

Constraint enforcement and diagnostics

saar.raz retitled this revision from Summary: Constraint enforcement and diagnostics to [Concepts] Constraint enforcement and diagnostics.Mar 10 2018, 4:26 AM
saar.raz updated this revision to Diff 138501.Mar 15 2018, 12:38 AM

Adjusted to changes in D41217

saar.raz updated this revision to Diff 138505.Mar 15 2018, 1:58 AM

Fixed SpecializedConcept reference to NamedConcept.

saar.raz updated this revision to Diff 138509.Mar 15 2018, 2:29 AM

Fixed another SpecializedConcept reference to NamedConcept.

saar.raz updated this revision to Diff 141248.Apr 5 2018, 5:48 PM

Adjusted to piecewise substitution.

  • Constraint satisfaction will no longer happen for depenent CSEs (was originally needed for normalization, but not worth the trouble with the new piecewise substitution and the fact that it prevents short-circuting)
  • Constraint satisfaction checking now breaks down unsatisfied constraint exprs into atomic constraints with the ill-formed diagnostic or the substituted constraint expression for each, later consumed by the diagnostic functions.
saar.raz updated this revision to Diff 159242.Aug 5 2018, 10:45 PM
  • Adjusted to switch to ASTTemplateArgumentList
saar.raz updated this revision to Diff 161348.Aug 17 2018, 3:22 PM
  • Adjusted to new CodeSynthesisContexts, added tests for them.
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2019, 4:31 PM
saar.raz updated this revision to Diff 195009.EditedApr 13 2019, 3:38 AM

Rebase onto trunk, add static assert diagnostics

saar.raz updated this revision to Diff 196091.Apr 22 2019, 10:36 AM

Adjusted to changes in getAssociatedConstraints interface

saar.raz updated this revision to Diff 204352.Jun 12 2019, 1:57 PM

Fix incorrect handling of recovered-from errors in constraint substitutions.

saar.raz updated this revision to Diff 204782.Jun 14 2019, 9:12 AM

Add support for CSE mangling

saar.raz updated this revision to Diff 207209.Sat, Jun 29, 1:14 PM

Create ASTConstraintSatisfaction for correctly storing constraint satisfaction data in AST nodes.

saar.raz updated this revision to Diff 209689.EditedSat, Jul 13, 6:39 AM

Rebase onto trunk.

saar.raz updated this revision to Diff 209695.Sat, Jul 13, 8:07 AM

Move ConstraintSatisfaction to ASTConcept.h