From c816195759aa392cc36bacde61c38357f7014d3e Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 21 Mar 2019 15:33:35 +0000 Subject: [ASTMatchers][OpenMP] OpenMP Structured-block-related matchers Summary: Exposes to the for ASTMatchers the interface/modelling of OpenMP structured-block. Reviewers: gribozavr, aaron.ballman, JonasToth, george.karpenkov Reviewed By: gribozavr, aaron.ballman Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D59463 llvm-svn: 356676 --- clang/docs/LibASTMatchersReference.html | 45 +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'clang/docs/LibASTMatchersReference.html') diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index eee51c35c5b..05f5c1fe486 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -3497,6 +3497,21 @@ should be passed as a quoted string. e.g., +Matcher<OMPExecutableDirective>isStandaloneDirective +
Matches standalone OpenMP directives,
+i.e., directives that can't have a structured block.
+
+Given
+
+  #pragma omp parallel
+  {}
+  #pragma omp taskyield
+
+``ompExecutableDirective(isStandaloneDirective()))`` matches
+``omp taskyield``.
+
+ + Matcher<ObjCMessageExpr>argumentCountIsunsigned N
Checks that a call expression or a constructor call expression has
 a specific number of arguments (including absent default arguments).
@@ -3867,6 +3882,19 @@ Usable as: Matcher<Stmt>isOMPStructuredBlock
+
Matches the Stmt AST node that is marked as being the structured-block
+of an OpenMP executable directive.
+
+Given
+
+   #pragma omp parallel
+   {}
+
+``stmt(isOMPStructuredBlock()))`` matches ``{}``.
+
+ + Matcher<StringLiteral>hasSizeunsigned N
Matches nodes that have the specified size.
 
@@ -6234,6 +6262,23 @@ Given
 
+Matcher<OMPExecutableDirective>hasStructuredBlockMatcher<Stmt> InnerMatcher +
Matches the structured-block of the OpenMP executable directive
+
+Prerequisite: the executable directive must not be standalone directive.
+If it is, it will never match.
+
+Given
+
+   #pragma omp parallel
+   ;
+   #pragma omp parallel
+   {}
+
+``ompExecutableDirective(hasStructuredBlock(nullStmt()))`` will match ``;``
+
+ + Matcher<ObjCMessageExpr>hasAnyArgumentMatcher<Expr> InnerMatcher
Matches any argument of a call expression or a constructor call
 expression, or an ObjC-message-send expression.
-- 
cgit v1.2.3