[clang] Initialize SmallVector variable (PR #114434)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 10:35:48 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Arvind Sudarsanam (asudarsa)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/114434.diff


1 Files Affected:

- (modified) clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp (+1-1) 


``````````diff
diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index 0639b95c76e218..fa37cbeb56316c 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -237,7 +237,7 @@ Expected<StringRef> linkDeviceInputFiles(ArrayRef<std::string> InputFiles,
 // will be linked with input device files.
 // The list of files and its location are passed from driver.
 Expected<SmallVector<std::string>> getSYCLDeviceLibs(const ArgList &Args) {
-  SmallVector<std::string> DeviceLibFiles;
+  SmallVector<std::string> DeviceLibFiles{};
   StringRef LibraryPath;
   if (Arg *A = Args.getLastArg(OPT_library_path_EQ))
     LibraryPath = A->getValue();

``````````

</details>


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


More information about the cfe-commits mailing list