[clang] 631b94c - [Driver] Remove redundant string initialization (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 6 10:55:01 PST 2022


Author: Kazu Hirata
Date: 2022-02-06T10:54:42-08:00
New Revision: 631b94cc22a83205c1d26baadb579b9c5576c8eb

URL: https://github.com/llvm/llvm-project/commit/631b94cc22a83205c1d26baadb579b9c5576c8eb
DIFF: https://github.com/llvm/llvm-project/commit/631b94cc22a83205c1d26baadb579b9c5576c8eb.diff

LOG: [Driver] Remove redundant string initialization (NFC)

Identified with readability-redundant-string-init.

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/WebAssembly.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index 4fdfb7e1762e0..292cf4d66971f 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -503,7 +503,7 @@ void WebAssembly::addLibStdCXXIncludePaths(
   bool IsKnownOs = (getTriple().getOS() != llvm::Triple::UnknownOS);
 
   // This is similar to detectLibcxxVersion()
-  std::string Version = "";
+  std::string Version;
   {
     std::error_code EC;
     Generic_GCC::GCCVersion MaxVersion =


        


More information about the cfe-commits mailing list