From 33b06688452f3da755b266d7ad45ffe2ef357d0e Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 17 Jan 2018 23:14:49 +0000 Subject: [PATCH] [ASTMatchers] Support generating docs for single-line matchers clang-format likes this format. PR35989. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322783 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/tools/dump_ast_matchers.py | 2 +- include/clang/ASTMatchers/ASTMatchers.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/tools/dump_ast_matchers.py b/docs/tools/dump_ast_matchers.py index ab7738fd76..d38977548f 100755 --- a/docs/tools/dump_ast_matchers.py +++ b/docs/tools/dump_ast_matchers.py @@ -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:] diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h index 2ec761068d..f1eabdec6a 100644 --- a/include/clang/ASTMatchers/ASTMatchers.h +++ b/include/clang/ASTMatchers/ASTMatchers.h @@ -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. /// -- 2.40.0