@@ -64,6 +64,9 @@ class SolutionResult {
64
64
// / \c numSolutions entries.
65
65
Solution *solutions = nullptr ;
66
66
67
+ // / A source range that was too complex to solve.
68
+ Optional<SourceRange> TooComplexAt = None;
69
+
67
70
// / General constructor for the named constructors.
68
71
SolutionResult (Kind kind) : kind(kind) {
69
72
emittedDiagnostic = false ;
@@ -95,9 +98,7 @@ class SolutionResult {
95
98
96
99
// / Produce a "too complex" failure, which was not yet been
97
100
// / diagnosed.
98
- static SolutionResult forTooComplex () {
99
- return SolutionResult (TooComplex);
100
- }
101
+ static SolutionResult forTooComplex (Optional<SourceRange> affected);
101
102
102
103
// / Produce a failure that has already been diagnosed.
103
104
static SolutionResult forError () {
@@ -123,6 +124,10 @@ class SolutionResult {
123
124
// / Take the set of solutions when there is an ambiguity.
124
125
MutableArrayRef<Solution> takeAmbiguousSolutions () &&;
125
126
127
+ // / Retrieve a range of source that has been determined to be too
128
+ // / complex to solve in a reasonable time.
129
+ Optional<SourceRange> getTooComplexAt () const { return TooComplexAt; }
130
+
126
131
// / Whether this solution requires the client to produce a diagnostic.
127
132
bool requiresDiagnostic () const {
128
133
switch (kind) {
0 commit comments