This is an archive of the discontinued LLVM Phabricator instance.

[mlir][PDLL-LSP] Add code completion for include file paths
ClosedPublic

Authored by rriddle on Apr 20 2022, 11:58 AM.

Details

Summary

This allows for providing completion results for include directive
file paths by searching the set of include directories for the current
file.

Diff Detail

Event Timeline

rriddle created this revision.Apr 20 2022, 11:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2022, 11:58 AM
rriddle requested review of this revision.Apr 20 2022, 11:58 AM
rriddle updated this revision to Diff 424289.Apr 21 2022, 2:04 PM
rriddle edited the summary of this revision. (Show Details)
jpienaar added inline comments.Apr 24 2022, 1:09 PM
mlir/lib/Tools/PDLL/Parser/Parser.cpp
685

Is string sufficient differentiator? Don't we need to be inside include too?

rriddle added inline comments.Apr 24 2022, 3:02 PM
mlir/lib/Tools/PDLL/Parser/Parser.cpp
685

Can you clarify what you mean here? If we hit a completion here inside of a string, that is for the include file. This method is only called from inside an include (Parser::parseInclude).

jpienaar accepted this revision.Apr 25 2022, 6:53 AM
jpienaar added inline comments.
mlir/lib/Tools/PDLL/Parser/Parser.cpp
685

The token kind

/// Token signifying a code completion location within a string.
    code_complete_string

is more general, but I missed this part was only inside parseInclude.

This revision is now accepted and ready to land.Apr 25 2022, 6:53 AM
This revision was landed with ongoing or failed builds.Apr 26 2022, 6:34 PM
This revision was automatically updated to reflect the committed changes.