This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Ignore cvr-qualifiers in selection.
ClosedPublic

Authored by sammccall on Jan 12 2022, 11:03 PM.

Details

Summary

The AST doesn't track their locations, and the default behavior of attributing
them to the lexically-enclosing node is sloppy and often inaccurate.

Also add a couple of passing test cases for declarators that weren't obvious.

Diff Detail

Event Timeline

sammccall created this revision.Jan 12 2022, 11:03 PM
sammccall requested review of this revision.Jan 12 2022, 11:03 PM
njames93 added inline comments.
clang-tools-extra/clangd/Selection.cpp
192

Just a drive by comment. This looks like it should be refactored to a switch just to make it more readable. Or if syntax::Token supports isOneOf method like clang::Token.

hokein accepted this revision.Jan 13 2022, 5:35 AM
This revision is now accepted and ready to land.Jan 13 2022, 5:35 AM
This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.