Skip to content

Commit

Permalink
[ASTMatchers] Support generating docs for single-line matchers
Browse files Browse the repository at this point in the history
clang-format likes this format. PR35989.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322783 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
d0k committed Jan 17, 2018
1 parent 5ae3508 commit 33b0668
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/tools/dump_ast_matchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def act_on_decl(declaration, comment, allowed_types):
(?:,\s*([^\s,]+)\s*
,\s*([^\s,]+)\s*)?
(?:,\s*\d+\s*)?
\)\s*{\s*$""", declaration, flags=re.X)
\)\s*{""", declaration, flags=re.X)
if m:
p, n, result, name = m.groups()[0:4]
args = m.groups()[4:]
Expand Down
4 changes: 1 addition & 3 deletions include/clang/ASTMatchers/ASTMatchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -3581,9 +3581,7 @@ AST_POLYMORPHIC_MATCHER_P(parameterCountIs,
/// \code
/// void nope();
/// \endcode
AST_MATCHER(FunctionDecl, isNoReturn) {
return Node.isNoReturn();
}
AST_MATCHER(FunctionDecl, isNoReturn) { return Node.isNoReturn(); }

/// \brief Matches the return type of a function declaration.
///
Expand Down

0 comments on commit 33b0668

Please sign in to comment.