[clang] Initialize SmallVector variable (PR #114434)

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


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

None

>From 9cfc10768adf19e41b22cd6a9fb2c781fdf4498e Mon Sep 17 00:00:00 2001
From: Arvind Sudarsanam <arvind.sudarsanam at intel.com>
Date: Thu, 31 Oct 2024 10:34:06 -0700
Subject: [PATCH] Initialize SmallVector variable

Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam at intel.com>
---
 clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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();



More information about the cfe-commits mailing list