This is an archive of the discontinued LLVM Phabricator instance.

[clang] Report range of the missing-memmber on no_member diagnostic.
AbandonedPublic

Authored by kadircet on Oct 4 2018, 8:56 AM.

Details

Summary

Currently no_member diagnostic only reports to range for the structs name, which
is not very useful when highlighting. This patch also adds the identifier which
caused diagnostic as a range. For example:

struct Foo {
  int x;
}
Foo foo;
foo.y;

only had [[foo]].y as a range and foo.^y as the location of the diagnostic.
After the patch it will have [[foo]].[[^y]] as ranges and location.

You can see the revision that adds a test in clangd as a dependent revision.

Diff Detail

Event Timeline

kadircet created this revision.Oct 4 2018, 8:56 AM
kadircet retitled this revision from Also report range for the name token on no_member error. to [clang] Report range of the missing-memmber on no_member diagnostic..Oct 4 2018, 8:58 AM
kadircet edited the summary of this revision. (Show Details)
kadircet abandoned this revision.Oct 9 2018, 1:39 AM