[clangd][NFC] Remove dead code
authorMariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Thu, 13 Jul 2023 10:47:37 +0000 (06:47 -0400)
committerMariya Podchishchaeva <mariya.podchishchaeva@intel.com>
Thu, 13 Jul 2023 10:47:49 +0000 (06:47 -0400)
commit8b4a27f410ba42b2e19651ddafc60cd878d0963c
treeb0e25d29cadf5a74279fd76f3d8218d3b2cbb10d
parent50378a16d41209545022975fb253a0ce2d9597cc
[clangd][NFC] Remove dead code

refactor/tweaks/ExtractVariable.cpp:
Condition (!C++ && !ExprType) is never true because if ExprType was null
we would early-exit earlier.

tool/ClangdMain.cpp:
StaticIdx variable is not initialized before check, so checking it
doesn't make sense.

Found by static analyzer tool.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D155164
clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
clang-tools-extra/clangd/tool/ClangdMain.cpp