This is an archive of the discontinued LLVM Phabricator instance.

Add default argument AST matcher
ClosedPublic

Authored by juliehockett on Nov 20 2017, 12:02 PM.

Details

Reviewers
aaron.ballman
Summary

Adds AST matcher for declarations with default arguments.

Diff Detail

Event Timeline

juliehockett created this revision.Nov 20 2017, 12:02 PM

You should also update lib\ASTMatchers\Dynamic\Registry.cpp to have the new matcher (be sure to keep the new matcher alphabetized as well).

Updated Registry.cpp to include new matcher.

aaron.ballman accepted this revision.Nov 20 2017, 1:25 PM

Aside from a minor nit with the comments leading to the public docs, LGTM!

include/clang/ASTMatchers/ASTMatchers.h
5825–5826

Remove the spurious semicolons (and regen the HTML docs).

This revision is now accepted and ready to land.Nov 20 2017, 1:25 PM

Removed spurious semicolons

juliehockett marked an inline comment as done.Nov 20 2017, 2:12 PM

I did find a few more spurious semicolons with the testing code as well.

If you need me to commit this on your behalf, I'm happy to do so, though it won't happen until tomorrow or Wed. Or, if you have commit privs, feel free to commit with the fixed test case.

unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
1995–1997

Spurious semicolons in here as well (sorry, I missed that before).

juliehockett marked an inline comment as done.

It'd be great if you could commit it -- I don't have commit privileges. Much appreciated!

I've commit in r318794, thank you!