Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs][clang-query] disclose Windows linetab bug on clang-query tab auto-complete #107956

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions clang-tools-extra/docs/clang-tidy/Contributing.rst
Original file line number Diff line number Diff line change
@@ -344,18 +344,20 @@ matching expressions to simplify your matcher.
clang-query> let c1 cxxRecordDecl()
clang-query> match c1

Alternatively, pressing the tab key after a previous matcher's open parentheses would also
show which matchers can be chained with the previous matcher, though some matchers that work
may not be listed.

Just like breaking up a huge function into smaller chunks with intention-revealing names
can help you understand a complex algorithm, breaking up a matcher into smaller matchers
with intention-revealing names can help you understand a complicated matcher.

Once you have a working clang-query matcher, the C++ API matchers will be the same or similar
to your interactively constructed matcher (there can be cases where they differ slightly).
You can use local variables to preserve your intention-revealing names that you applied
to nested matchers.
Alternatively, pressing the tab key after a previous matcher's open parentheses
would also show which matchers can be chained with the previous matcher,
though some matchers that work may not be listed. Note that tab completion
does not currently work on Windows.

Just like breaking up a huge function into smaller chunks with
intention-revealing names can help you understand a complex algorithm, breaking
up a matcher into smaller matchers with intention-revealing names can help
you understand a complicated matcher.

Once you have a working :program:`clang-query` matcher, the C++ API matchers
will be the same or similar to your interactively constructed matcher (there
can be cases where they differ slightly). You can use local variables to preserve
your intention-revealing names that you applied to nested matchers.

Creating private matchers
^^^^^^^^^^^^^^^^^^^^^^^^^