This is an archive of the discontinued LLVM Phabricator instance.

[clangd][NFC] Remove dead code
ClosedPublic

Authored by Fznamznon on Jul 13 2023, 2:28 AM.

Details

Summary

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.

Diff Detail

Event Timeline

Fznamznon created this revision.Jul 13 2023, 2:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 2:28 AM
Fznamznon requested review of this revision.Jul 13 2023, 2:28 AM
sammccall accepted this revision.Jul 13 2023, 2:51 AM

thanks!

This revision is now accepted and ready to land.Jul 13 2023, 2:51 AM
This revision was automatically updated to reflect the committed changes.