[all-commits] [llvm/llvm-project] 8e329c: Reland "[Clang][SemaCXX] Add unused warning for va...
Takuya Shimizu via All-commits
all-commits at lists.llvm.org
Tue Aug 15 01:24:59 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8e329caa944c377c51ef567d5aa67cfac9ffd0fa
https://github.com/llvm/llvm-project/commit/8e329caa944c377c51ef567d5aa67cfac9ffd0fa
Author: Takuya Shimizu <shimizu2486 at gmail.com>
Date: 2023-08-15 (Tue, 15 Aug 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Sema/SemaDecl.cpp
M clang/lib/Sema/SemaExprCXX.cpp
M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
M clang/test/SemaCXX/warn-unused-variables.cpp
M llvm/lib/Support/VirtualFileSystem.cpp
Log Message:
-----------
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
More information about the All-commits
mailing list