This is an archive of the discontinued LLVM Phabricator instance.

[Index] Use locations to uniquify function-scope BindingDecl USR
ClosedPublic

Authored by MaskRay on Sep 24 2018, 4:22 PM.

Details

Summary

This makes BindingDecl's of the same name have different USRs, so that references can be correctly attributed.

int a[1] = {};
{ auto [x] = a; x; }
{ auto [x] = a; x; }

Diff Detail

Event Timeline

MaskRay created this revision.Sep 24 2018, 4:22 PM
hokein added a comment.Oct 5 2018, 1:20 AM

Can you add a test?

MaskRay updated this revision to Diff 168486.Oct 5 2018, 10:29 AM

Add test to Core/index-source.cpp

hokein accepted this revision.Oct 8 2018, 2:42 AM

The change looks reasonable to me, so lg. I'd wait a bit to see whether other reviewers have comments.

lib/Index/USRGeneration.cpp
339

use isLocal(D) instead.

This revision is now accepted and ready to land.Oct 8 2018, 2:42 AM
MaskRay updated this revision to Diff 168704.Oct 8 2018, 1:08 PM

Use isLocal

MaskRay marked an inline comment as done.Oct 8 2018, 1:08 PM
This revision was automatically updated to reflect the committed changes.