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
This commit is contained in:
1 parent
dcb6d212fd
commit
8e329caa94
6 files changed
+123
-4
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user