[llvm] 328b72d - [Support] Fix clang warning in widenPath NFC
Andrew Ng via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 23 12:00:53 PDT 2020
Author: Andrew Ng
Date: 2020-03-23T18:59:55Z
New Revision: 328b72dd8209fc447b5eac3106072561bb01dff3
URL: https://github.com/llvm/llvm-project/commit/328b72dd8209fc447b5eac3106072561bb01dff3
DIFF: https://github.com/llvm/llvm-project/commit/328b72dd8209fc447b5eac3106072561bb01dff3.diff
LOG: [Support] Fix clang warning in widenPath NFC
Differential Revision: https://reviews.llvm.org/D76544
Added:
Modified:
llvm/lib/Support/Windows/Path.inc
Removed:
################################################################################
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index ee199aa1d4b1..0eadefb689fd 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -75,8 +75,7 @@ std::error_code widenPath(const Twine &Path8, SmallVectorImpl<wchar_t> &Path16,
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 @@ std::error_code widenPath(const Twine &Path8, SmallVectorImpl<wchar_t> &Path16,
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;
}
More information about the llvm-commits
mailing list