r322783 - [ASTMatchers] Support generating docs for single-line matchers
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 17 15:14:49 PST 2018
Author: d0k
Date: Wed Jan 17 15:14:49 2018
New Revision: 322783
URL: http://llvm.org/viewvc/llvm-project?rev=322783&view=rev
Log:
[ASTMatchers] Support generating docs for single-line matchers
clang-format likes this format. PR35989.
Modified:
cfe/trunk/docs/tools/dump_ast_matchers.py
cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
Modified: cfe/trunk/docs/tools/dump_ast_matchers.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/tools/dump_ast_matchers.py?rev=322783&r1=322782&r2=322783&view=diff
==============================================================================
--- cfe/trunk/docs/tools/dump_ast_matchers.py (original)
+++ cfe/trunk/docs/tools/dump_ast_matchers.py Wed Jan 17 15:14:49 2018
@@ -237,7 +237,7 @@ def act_on_decl(declaration, comment, al
(?:,\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:]
Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h?rev=322783&r1=322782&r2=322783&view=diff
==============================================================================
--- cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h (original)
+++ cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Wed Jan 17 15:14:49 2018
@@ -3581,9 +3581,7 @@ AST_POLYMORPHIC_MATCHER_P(parameterCount
/// \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.
///
More information about the cfe-commits
mailing list