[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
This commit is contained in:
Benjamin Kramer 2018-01-17 23:14:49 +00:00
parent 5ae3508468
commit 33b0668845
2 changed files with 2 additions and 4 deletions

View File

@ -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:]

View File

@ -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.
///