[PATCH] D76544: [Support] Fix clang warning in widenPath NFC
Andrew Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 21 05:20:54 PDT 2020
andrewng created this revision.
andrewng added a reviewer: aganea.
Herald added a subscriber: hiraditya.
Fix warning when compiled with clang-cl.
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.251838.patch
Type: text/x-patch
Size: 698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200321/72b54e0f/attachment.bin>
More information about the llvm-commits
mailing list