[all-commits] [llvm/llvm-project] 01b88d: [NFC] Remove unused variables declared in conditions
Takuya Shimizu via All-commits
all-commits at lists.llvm.org
Tue Aug 29 18:07:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 01b88dd66d9d52d3f531a7d490e18c549f36f445
https://github.com/llvm/llvm-project/commit/01b88dd66d9d52d3f531a7d490e18c549f36f445
Author: Takuya Shimizu <shimizu2486 at gmail.com>
Date: 2023-08-30 (Wed, 30 Aug 2023)
Changed paths:
M clang/include/clang/ASTMatchers/ASTMatchers.h
M clang/lib/AST/Interp/ByteCodeStmtGen.cpp
M clang/lib/CodeGen/BackendUtil.cpp
M clang/lib/CodeGen/CGOpenMPRuntime.cpp
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/Driver/ToolChains/Cuda.cpp
M clang/lib/StaticAnalyzer/Checkers/FuchsiaHandleChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/Yaml.h
M clang/tools/clang-scan-deps/ClangScanDeps.cpp
M lld/MachO/Driver.cpp
M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
M llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
M llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
M llvm/lib/IR/PrintPasses.cpp
M llvm/lib/Passes/StandardInstrumentations.cpp
M llvm/lib/Support/VirtualFileSystem.cpp
M llvm/tools/llvm-profgen/ProfiledBinary.cpp
Log Message:
-----------
[NFC] Remove unused variables declared in conditions
D152495 makes clang warn on unused variables that are declared in conditions like `if (int var = init) {}`
This patch is an NFC fix to suppress the new warning in llvm,clang,lld builds to pass CI in the above patch.
Differential Revision: https://reviews.llvm.org/D158016
Commit: 92023b15099012a657da07ebf49dd7d94a260f84
https://github.com/llvm/llvm-project/commit/92023b15099012a657da07ebf49dd7d94a260f84
Author: Takuya Shimizu <shimizu2486 at gmail.com>
Date: 2023-08-30 (Wed, 30 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
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 unused and 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
Compare: https://github.com/llvm/llvm-project/compare/c948e3e75780...92023b150990
More information about the All-commits
mailing list