[NFC] Remove dead code detected by code sanitizer. (#134385)
The code sanitizer is failing with this error: `Execution cannot reach this statement.` The execution code path would early exit at line 928 if `(Lil && Ril) = true`.
This commit is contained in:
committed by
GitHub
parent
c22586a9d1
commit
ebb0e6cb25
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user