Commit Graph

10 Commits

Author SHA1 Message Date
Hamish Knight
99f63410cf [Index] Handle more cases in reportRelatedTypeRef
Look through attributed/specifier/paren TypeReprs, avoid reporting
`RelBase` relations for suppressed conformances, and handle protocol
compositions for the `Type` code path.

rdar://146331982
2025-07-30 14:59:05 +01:00
Hamish Knight
5e8c1a4b69 [Index] Avoid passing composition SourceLoc in reportRelatedTypeRef
We want to use the SourceLoc of each individual member of the
composition.
2025-07-30 14:59:05 +01:00
Keith Smiley
6c2ccb4c43 reland: Fix RelBase indexing with composite types (#65550)
Previously the index data differed when using `Foo, Bar` vs `Foo & Bar`.

Fixes #56255

This reverts commit 5e2c7a9d47.
2023-05-02 17:01:28 -07:00
Keith Smiley
5e2c7a9d47 Revert "Fix RelBase indexing with composite types"
This crashes with typealiases referenced across files. I will resubmit
with a fix. See also https://github.com/apple/swift/pull/65545

This reverts commit 7a5e9dcf19.
2023-05-01 11:24:32 -07:00
Keith Smiley
7a5e9dcf19 Fix RelBase indexing with composite types
Previously the index data differed when using `Foo, Bar` vs `Foo & Bar`.

Fixes https://github.com/apple/swift/issues/56255
2023-04-29 12:46:31 -07:00
Ravi Kandhadai
614a87279d [Tests] Fix places where "CHECK" and similar file check commands are
used without a colon.
2019-07-10 15:49:24 -07:00
Rintaro Ishizaki
4773808cd0 [Index] Add test case for opaque result types
rdar://problem/49398426
2019-04-19 17:34:08 -07:00
Ben Langmuir
981167d3d5 [index] Add back override relation for associated type witnesses
When conforming to a protocol, the index should have a "override"
relation for each witness, including type witnesses.  This was
accidentally broken in 3bd80e5e31 when we stopped using the
type-checker to find all protocol conformances.

rdar://47833618
2019-02-06 15:45:35 -08:00
Doug Gregor
0972111c60 [Type checker] Start tracking overrides of protocol requirements.
When a protocol that inherits another protocol restates a requirement
from its inherited protocol, track that as an override in the AST.
2018-09-04 16:42:06 -07:00
Argyrios Kyrtzidis
3bd80e5e31 [index] Improvements on how conformances are recorded (#19043)
Query for the local conformances of a DeclContext and record conformances of
functions that are defined in other types as 'implicit' overrides, with
the type that introduces the conformance as container symbol.

This allows more accurate index data, and avoids needing to query for all
protocol requirements, which is expensive to calculate.
2018-08-29 10:31:23 -07:00