Page MenuHomePhabricator

[clangd] Consider () part of the FunctionDecl, not the FunctionTypeLoc
Needs ReviewPublic

Authored by sammccall on Dec 10 2019, 9:33 AM.

Details

Reviewers
kadircet
Summary

CODE: int foo(int);
OLD: TTT FFFTTTTT
NEW: TTT FFFFTTTF

This works around targeting issues when the cursor is between name and (

Diff Detail

Event Timeline

sammccall created this revision.Dec 10 2019, 9:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2019, 9:33 AM

Build result: pass - 60682 tests passed, 0 failed and 726 were skipped.

Log files: console-log.txt, CMakeCache.txt

kadircet accepted this revision.Dec 11 2019, 12:12 AM
kadircet added inline comments.
clang-tools-extra/clangd/Selection.cpp
578

comment needs to be updated

clang-tools-extra/clangd/unittests/SelectionTests.cpp
253

could you also add case for closing paren (possibly with a trailing const attribute ?

This revision is now accepted and ready to land.Dec 11 2019, 12:12 AM

D71345 is a different approach that would solve this problem and others (at higher cost).
I don't think we should land both, so let's park this until we decide on the fate of that patch.

kadircet resigned from this revision.Feb 23 2020, 5:45 AM

I believe this revision is obsolete since D71345 has landed.

This revision now requires review to proceed.Feb 23 2020, 5:45 AM