This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] Expand isInline matcher to VarDecl
ClosedPublic

Authored by njames93 on Feb 3 2022, 6:41 AM.

Details

Summary

Add support to the isInline matcher for C++17's inline variables.

Diff Detail

Event Timeline

njames93 requested review of this revision.Feb 3 2022, 6:41 AM
njames93 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2022, 6:41 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Izaron added a subscriber: Izaron.Feb 4 2022, 10:23 AM

Thanks for the matcher! I'm planning to reuse it in my checker (D118743). Looking forward to seeing this commit merged.

Izaron added inline comments.Feb 4 2022, 10:26 AM
clang/docs/LibASTMatchersReference.html
5736

Matches function and namespace declarations

Could it be something like

Matches variable, function and namespace declarations

?

Also, maybe it worth to mention the checker in release notes? In clang/docs/ReleaseNotes.rst

Izaron added inline comments.Feb 4 2022, 10:27 AM
clang/docs/LibASTMatchersReference.html
5736

(The matcher, not checker, of course)

njames93 updated this revision to Diff 410186.Feb 20 2022, 2:09 PM
njames93 marked an inline comment as done.

Update description and release notes.

This revision is now accepted and ready to land.Feb 22 2022, 6:21 AM
This revision was landed with ongoing or failed builds.Feb 23 2022, 12:34 AM
This revision was automatically updated to reflect the committed changes.