[clang] [Clang][Unittest] Support for `target` update directive and `from` clause in clang unittests (PR #150580)

Amit Tiwari via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 9 05:28:45 PDT 2025


================
@@ -2742,6 +2742,32 @@ void x() {
   EXPECT_TRUE(notMatchesWithOpenMP(Source2, Matcher));
 }
 
+TEST(ASTMatchersTestOpenMP, OMPTargetUpdateDirective) {
+  auto Matcher = stmt(ompTargetUpdateDirective());
+
+  StringRef Source0 = R"(
+    void foo() {
+      int arr[8];
+      #pragma omp target update from(arr[0:8:2])
----------------
amitamd7 wrote:

Just updated the patch with refined checks. 

https://github.com/llvm/llvm-project/pull/150580


More information about the cfe-commits mailing list