[clang] [llvm] Assume (PR #97535)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 04:21:44 PDT 2024


================
@@ -1759,8 +1759,35 @@ void Parser::ParseOpenMPAssumesDirective(OpenMPDirectiveKind DKind,
     Assumptions.push_back(Assumption);
   }
 
+  StmtResult AssociatedStmt;
+
+  // Begin marking the scope for assume.
+  if (DKind == llvm::omp::Directive::OMPD_assume) {
+
+    if (Tok.getKind() == clang::tok::annot_pragma_openmp_end)
+      ConsumeAnyToken();
+
+    DeclarationNameInfo DirName;
+    Actions.OpenMP().StartOpenMPDSABlock(DKind, DirName, Actions.getCurScope(),
+                                         Loc);
+  }
----------------
alexey-bataev wrote:

Introduce RAAI class for this and use it instead

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


More information about the llvm-commits mailing list