This is an archive of the discontinued LLVM Phabricator instance.

[clang-query] Add check to prevent setting srcloc when no introspection is available.
ClosedPublic

Authored by njames93 on Apr 27 2021, 7:11 AM.

Details

Summary

Checks if introspection support is available set output kind parser.
If it isn't present the auto complete will not suggest srcloc and an error query will be reported if a user tries to access it.

Diff Detail

Event Timeline

njames93 requested review of this revision.Apr 27 2021, 7:11 AM
njames93 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2021, 7:11 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
njames93 updated this revision to Diff 340902.Apr 27 2021, 10:23 AM

Fix up tests(probably, see what premerge says)

steveire accepted this revision.Apr 27 2021, 2:46 PM

LGTM!

clang-tools-extra/unittests/clang-query/QueryParserTest.cpp
249

nit: I think HasIntrospection ? 4 : 3 would be clearer.

This revision is now accepted and ready to land.Apr 27 2021, 2:46 PM