[PATCH] D76544: [Support] Fix clang warning in widenPath NFC

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 12:01:13 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG328b72dd8209: [Support] Fix clang warning in widenPath NFC (authored by andrewng).
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76544/new/

https://reviews.llvm.org/D76544

Files:
  llvm/lib/Support/Windows/Path.inc


Index: llvm/lib/Support/Windows/Path.inc
===================================================================
--- llvm/lib/Support/Windows/Path.inc
+++ llvm/lib/Support/Windows/Path.inc
@@ -75,8 +75,7 @@
   SmallString<MAX_PATH> Path8Str;
   Path8.toVector(Path8Str);
 
-  std::error_code EC = UTF8ToUTF16(Path8Str, Path16);
-  if (EC)
+  if (std::error_code EC = UTF8ToUTF16(Path8Str, Path16))
     return EC;
 
   const bool IsAbsolute = llvm::sys::path::is_absolute(Path8);
@@ -97,7 +96,7 @@
     return std::error_code();
 
   if (!IsAbsolute) {
-    if (EC = llvm::sys::fs::make_absolute(Path8Str))
+    if (std::error_code EC = llvm::sys::fs::make_absolute(Path8Str))
       return EC;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76544.252113.patch
Type: text/x-patch
Size: 698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200323/d3a006aa/attachment.bin>


More information about the llvm-commits mailing list