================
@@ -1337,6 +1337,13 @@ checkExprLifetimeImpl(Sema &SemaRef, const 
InitializedEntity *InitEntity,
         // expression.
         if (LK == LK_StmtExprResult)
           return false;
+        if (auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) {
+          if (VD->getType().getAddressSpace() == LangAS::opencl_local &&
+              SemaRef.getOpenCLOptions().isAvailableOption(
+                  "__cl_clang_function_scope_local_variables",
+                  SemaRef.getLangOpts()))
----------------
wenju-he wrote:

> Shouldn't need to check if the extension is enabled

done, dropped the extension check.

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

Reply via email to