From 6be9af4d254bca225b6627eb34163e38c97a3747 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356676 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LibASTMatchersReference.html | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'docs') diff --git a/docs/LibASTMatchersReference.html b/docs/LibASTMatchersReference.html index eee51c35c5..05f5c1fe48 100644 --- a/docs/LibASTMatchersReference.html +++ b/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.1