[llvm-branch-commits] [clang] [clang][OpenMP] Add AST node for root of compound directive (PR #118878)

Johannes Doerfert via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Apr 23 08:09:14 PDT 2025


================
@@ -9406,6 +9406,14 @@ StmtResult TreeTransform<Derived>::TransformOMPInformationalDirective(
       D->getBeginLoc(), D->getEndLoc());
 }
 
+template <typename Derived>
+StmtResult TreeTransform<Derived>::TransformOMPCompoundRootDirective(
+    OMPCompoundRootDirective *D) {
+  // This function should never be found in a template. Directive splitting
+  // only happens in non-template functions.
+  llvm_unreachable("TransformOMPCompoundRootDirective in a template");
----------------
jdoerfert wrote:

I'm not sure llvm_unreachable is the right kind of error here. Maybe it is. Is there precedent? 

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


More information about the llvm-branch-commits mailing list