This is an archive of the discontinued LLVM Phabricator instance.

[CodeComplete] Fix completion in the middle of idents in macro calls
ClosedPublic

Authored by ilya-biryukov on Jan 18 2018, 7:06 AM.

Details

Summary

This patch removes IdentifierInfo from completion token after remembering
the identifier in the preprocessor.

Prior to this patch, completion token had the IdentifierInfo set to null when
completing at the start of identifier and to the II for completion prefix
when in the middle of identifier.

This patch unifies how code completion token is handled when it is insterted
before the identifier and in the middle of the identifier.

The actual IdentifierInfo can still be obtained from the Preprocessor.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.Jan 18 2018, 7:06 AM
bkramer accepted this revision.Jan 22 2018, 6:57 AM

I think we can go ahead with this. I expect code completion in the middle of a token not to be used much though, so there might be more broken cases.

This revision is now accepted and ready to land.Jan 22 2018, 6:57 AM
This revision was automatically updated to reflect the committed changes.