Commit Graph

10 Commits

Author SHA1 Message Date
Ian Leitch
1ef1e2f829 [Index] Apply RelationContainedBy role to references contained by VarDecl.
This reverts commit abf6a30ba0.
2021-11-30 10:54:14 +01:00
Ben Barham
abf6a30ba0 Revert "[Index] Apply RelationContainedBy role to references contained by VarDecl." 2021-11-16 08:56:01 +10:00
Ian Leitch
887e71009a [Index] Apply RelationContainedBy role to references contained by VarDecl.
References associated with a `VarDecl` had no `RelationContainedBy` role, resulting in "orphaned" references. From the perspective of identifying unused code (in tools using the index, like [Periphery](https://github.com/peripheryapp/periphery)), this made it impossible to identify that a variable's type, initializer and custom attributes are associated with the variable.

Resolves: [SR-13766](https://bugs.swift.org/browse/SR-13766)
2021-11-10 09:43:24 +00:00
Rintaro Ishizaki
f2502b9f61 [Test] Add indexing test cases for ExplicitCastExpr 2020-07-23 10:01:33 -07:00
Bruno Rocha
160eb6cfd8 Update index test response to cover unavailable calls 2020-04-12 19:18:47 -07:00
Slava Pestov
4caa6d7003 IDE: Fix indexing for Sema-built curry thunks 2020-03-17 19:03:03 -04:00
Argyrios Kyrtzidis
60522887d9 [Sema/CSApply] Make sure that the member type references created for a type(of: x).A expression are visible to the SourceEntityWalker
For code like

```
  _ = type(of: x).A.self
```

the `A` type reference is written explicitely by the user, but the AST created using `TypeExpr::createImplicitHack` is hiding such a reference,
making the reference invisible to semantic functionality like 'rename'.

rdar://56885871
2020-02-01 01:26:07 -08:00
Argyrios Kyrtzidis
f752844ccd [index] Make sure to walk the accessor bodies of local properties (#19102)
[index] Make sure to walk the accessor bodies of local properties

Otherwise we'll miss global symbols references.
rdar://42301005
2018-09-01 08:27:27 -07:00
Robert Widmann
39494b2ba2 Rearrange test code for exhaustiveness 2017-04-28 02:06:39 -04:00
Argyrios Kyrtzidis
e29ffdea5c [SourceEntityWalker] Ignore implicit patterns when walking the AST using SourceEntityWalker
SourceEntityWalker is generally ignoring implicit AST nodes but we missed ignoring implicit patterns.
This had the effect of not ignoring implicit pattern matches to Optional.some() which resulted in
cursor-info returning Optional.some instead of what is actually written in code.
2017-03-03 07:01:26 -08:00