Skip to content

[Clang-tidy][NFC] Remove dead code detected by code sanitizer. #134385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,18 +927,6 @@ static bool areExprsSameMacroOrLiteral(const BinaryOperator *BinOp,
if (Lil && Ril)
return Lil->getValue() == Ril->getValue();

const auto *LStrl = dyn_cast<StringLiteral>(Lhs);
const auto *RStrl = dyn_cast<StringLiteral>(Rhs);
if (Lil && Ril) {
const llvm::StringRef L = Lexer::getSourceText(
CharSourceRange::getTokenRange(LStrl->getBeginLoc()), SM,
Context->getLangOpts(), 0);
const llvm::StringRef R = Lexer::getSourceText(
CharSourceRange::getTokenRange(RStrl->getBeginLoc()), SM,
Context->getLangOpts(), 0);
return L.compare(R) == 0;
}

const auto *Lbl = dyn_cast<CXXBoolLiteralExpr>(Lhs);
const auto *Rbl = dyn_cast<CXXBoolLiteralExpr>(Rhs);
if (Lbl && Rbl)
Expand Down
Loading