This is an archive of the discontinued LLVM Phabricator instance.

[clang-query] Add comment token handling
ClosedPublic

Authored by steveire on Oct 1 2018, 3:49 PM.

Details

Summary

It is possible to pass a file of commands to clang-query using the
command line option -f or --preload. Make it possible to write comments
in such files.

Event Timeline

steveire created this revision.Oct 1 2018, 3:49 PM
steveire updated this revision to Diff 167848.Oct 1 2018, 3:52 PM

Remove garbage

aaron.ballman accepted this revision.Oct 2 2018, 2:37 PM

LGTM aside from a minor nit.

clang-query/QueryParser.cpp
42

This is just returning an empty StringRef, isn't it? Might as well return StringRef() through the default constructor for clarity.

This revision is now accepted and ready to land.Oct 2 2018, 2:37 PM
This revision was automatically updated to reflect the committed changes.
steveire marked an inline comment as done.Oct 3 2018, 1:29 AM
steveire added inline comments.
clang-query/QueryParser.cpp
42

I copied the pattern from a few lines above, but there is it actually necessary as it is used in the code completion infrastructure. Comments don't participate in code completion so I changed it as described.

steveire marked 2 inline comments as done.Oct 3 2018, 1:29 AM