This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add TagDecl AST matcher
ClosedPublic

Authored by f00kat on Jan 27 2020, 5:24 AM.

Details

Summary

In this case https://reviews.llvm.org/D73090#1840501 @aaron.ballman suggest to add new AST matcher for tagDecl to avoid using recordDecl and enumDecl together.

Diff Detail

Event Timeline

f00kat created this revision.Jan 27 2020, 5:24 AM

You should also regenerate the AST matcher documentation by running clang\docs\tools\dump_ast_matchers.py

clang/lib/ASTMatchers/Dynamic/Registry.cpp
211–212

Please keep this list in alphabetical order.

A drive-by comment.

clang/lib/ASTMatchers/Dynamic/Registry.cpp
212

There's already tagType registration on the line 497. And yes, should the list be sorted, that would be obvious.

f00kat updated this revision to Diff 240779.Jan 27 2020, 11:30 PM
  1. Fix Registry.cpp
  2. Generate AST Matchers doc
aaron.ballman accepted this revision.Jan 28 2020, 4:58 AM

LGTM! Do you need someone to commit on your behalf?

This revision is now accepted and ready to land.Jan 28 2020, 4:58 AM
f00kat marked an inline comment as done.Jan 28 2020, 6:05 AM

LGTM! Do you need someone to commit on your behalf?

Yes, please. I don`t know how :)

clang/lib/ASTMatchers/Dynamic/Registry.cpp
212

Fixed

LGTM! Do you need someone to commit on your behalf?

Yes, please. I don`t know how :)

I'm happy to do so, but I'm not certain what email address you'd like me to use for you (I can't quite suss it out from the phab emails). Can you let me know what address you'd like me to use for the commit attribution?

LGTM! Do you need someone to commit on your behalf?

Yes, please. I don`t know how :)

I'm happy to do so, but I'm not certain what email address you'd like me to use for you (I can't quite suss it out from the phab emails). Can you let me know what address you'd like me to use for the commit attribution?

Yeah, sure. "cc.tapa@gmail.com".
I forget to verify email in Phabricator settings.
Thank you!

aaron.ballman closed this revision.Jan 29 2020, 4:59 AM

I've committed on your behalf in d5dfd1350efb80f9674db322999dd883fb36a6ad, thank you for the patch!