Commit Graph

2 Commits

Author SHA1 Message Date
Ben Barham
21f997c01a [IDE] Remove invalid assertions
The declaration and reference aren't necessarily the same type (eg. they
could be a function and a local). Thus they don't have to have the same
names, making the assertion invalid.

Resolves #63262.
2023-01-27 21:24:25 -08:00
Ben Barham
7b4ab8d0e6 [Index] Resolve any shadowed references to the decl they shadow
Skip the shadowing decl and instead reference the top-most shadowed decl
(ie. follow any shadowed decls up the chain).

Also fix `getShorthandShadows` missing references in `MemberDeclRefExpr`
by using `getReferencedDecl` instead of assuming it is a `DeclRefExpr`.

Resolves rdar://99730146, rdar://100006415, and rdar://103449038.
2023-01-20 14:34:10 -08:00