Author: Kazu Hirata
Date: 2025-04-17T10:19:37-07:00
New Revision: 3133c956c57c5b952d3289323891dcdc252ea333

URL: 
https://github.com/llvm/llvm-project/commit/3133c956c57c5b952d3289323891dcdc252ea333
DIFF: 
https://github.com/llvm/llvm-project/commit/3133c956c57c5b952d3289323891dcdc252ea333.diff

LOG: [clang-sycl-linker] Fix a warning

This patch fixes:

  clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp:368:14: error:
  moving a local object in a return statement prevents copy elision
  [-Werror,-Wpessimizing-move]

Added: 
    

Modified: 
    clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp 
b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index 79747b0550417..61ec4dbc1489d 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -365,7 +365,7 @@ Error runSYCLLink(ArrayRef<std::string> Files, const 
ArgList &Args) {
     SPVFile.append("_" + utostr(I) + ".spv");
     auto Err = runSPIRVCodeGen(SplitModules[I], Args, SPVFile, C);
     if (Err)
-      return std::move(Err);
+      return Err;
     SplitModules[I] = SPVFile;
   }
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to