================
@@ -11599,15 +11587,54 @@ void 
CGOpenMPRuntime::scanForTargetRegionsFunctions(const Stmt *S,
     return;
   }
 
-  // If this is a lambda function, look into its body.
-  if (const auto *L = dyn_cast<LambdaExpr>(S))
+  // Default arguments and member initializers are not children of their uses.
+  if (const auto *E = dyn_cast<CXXDefaultArgExpr>(S)) {
+    scanForTargetRegionsFunctions(E->getExpr(), ParentName);
+    return;
+  }
+  if (const auto *E = dyn_cast<CXXDefaultInitExpr>(S)) {
+    scanForTargetRegionsFunctions(E->getExpr(), ParentName);
+    return;
+  }
+
+  // An implicitly-defined constructor is only reachable from its uses.
+  if (const auto *E = dyn_cast<CXXConstructExpr>(S)) {
+    const CXXConstructorDecl *Ctor = E->getConstructor();
+    if (!Ctor->isUserProvided())
----------------
akash-manna-sky wrote:

Applied!

https://github.com/llvm/llvm-project/pull/240840
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to