diff options
author | Takuya Shimizu <shimizu2486@gmail.com> | 2023-08-15 17:24:13 +0900 |
---|---|---|
committer | Takuya Shimizu <shimizu2486@gmail.com> | 2023-08-15 17:24:13 +0900 |
commit | 8e329caa944c377c51ef567d5aa67cfac9ffd0fa (patch) | |
tree | a45442db602d6d639ef31a4e66da2d968e013d81 /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | dcb6d212fdfb1db60bc5ba1c877897cb5ba0546c (diff) | |
download | llvm-8e329caa944c377c51ef567d5aa67cfac9ffd0fa.zip llvm-8e329caa944c377c51ef567d5aa67cfac9ffd0fa.tar.gz llvm-8e329caa944c377c51ef567d5aa67cfac9ffd0fa.tar.bz2 |
Reland "[Clang][SemaCXX] Add unused warning for variables declared in condition expressions"
This patch marks the declarations with initializations in condition expressions such as
if (int var = init) as unreferenced so that -Wunused can warn on them.
Fixes https://github.com/llvm/llvm-project/issues/61681
Reviewed By: cor3ntin
Differential Revision: https://reviews.llvm.org/D152495
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r-- | llvm/lib/Support/VirtualFileSystem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index d381d79..e361510 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -1337,7 +1337,7 @@ std::error_code RedirectingFileSystem::isLocal(const Twine &Path_, SmallString<256> Path; Path_.toVector(Path); - if (std::error_code EC = makeCanonical(Path)) + if (makeCanonical(Path)) return {}; return ExternalFS->isLocal(Path, Result); |