This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarations
ClosedPublic

Authored by lebedev.ri on Dec 20 2017, 10:08 AM.

Diff Detail

Repository
rC Clang

Event Timeline

lebedev.ri created this revision.Dec 20 2017, 10:08 AM

You regenerate the HTML by running clang/docs/tools/dump_ast_matchers.py.

unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
1775

Spurious semicolon, which happens elsewhere in the tests as well -- please clean them all.

1834

For fun, I'd like to see a matchesC test for _Noreturn as well, just to be extra sure. :-)

lebedev.ri marked 2 inline comments as done.
  • Added C tests
  • Cleaned-up spurious semicolons
  • Docs are still not regenerated, somehow that script results in a huge diff for me.
aaron.ballman accepted this revision.Dec 24 2017, 9:20 AM
aaron.ballman added a subscriber: dblaikie.

Aside from a documentation nit, this LGTM. However, you should wait to commit until after you can safely regenerate the AST matcher documentation. The issue there is that dump_ast_matchers.py was not updated after r318304. I believe @dblaikie was looking into the Python script, but I'm not certain how far he got with it.

include/clang/ASTMatchers/ASTMatchers.h
3579–3595

I don't think the documentation needs to list all of these -- it would be better to pick a representative few and just use those.

This revision is now accepted and ready to land.Dec 24 2017, 9:20 AM

Aside from a documentation nit, this LGTM. However, you should wait to commit until after you can safely regenerate the AST matcher documentation. The issue there is that dump_ast_matchers.py was not updated after r318304. I believe @dblaikie was looking into the Python script, but I'm not certain how far he got with it.

@dblaikie Hi! Did you get anywhere with the script update?
As far i'm concerned, all new ASTMatchers are stalled because of this...

lebedev.ri edited the summary of this revision. (Show Details)

Going to finally land this.

Update extra newline that prevented full documentation generation :/

lebedev.ri marked an inline comment as done.

Address review note: reduce amount of examples in documentation.

Great, looks good to commit. Thanks, Roman!

This revision was automatically updated to reflect the committed changes.