Skip to content

Commit c5d4575

Browse files
committed
remove redundant nullptr in RedundantExpressionCheck
1 parent 4b061f9 commit c5d4575

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -909,12 +909,10 @@ static bool areExprsSameMacroOrLiteral(const BinaryOperator *BinOp,
909909
// Left is macro so right macro too
910910
if (Rsr.getBegin().isMacroID()) {
911911
// Both sides are macros so they are same macro or literal
912-
const llvm::StringRef L =
913-
Lexer::getSourceText(CharSourceRange::getTokenRange(Lsr), SM,
914-
Context->getLangOpts(), nullptr);
915-
const llvm::StringRef R =
916-
Lexer::getSourceText(CharSourceRange::getTokenRange(Rsr), SM,
917-
Context->getLangOpts(), nullptr);
912+
const llvm::StringRef L = Lexer::getSourceText(
913+
CharSourceRange::getTokenRange(Lsr), SM, Context->getLangOpts());
914+
const llvm::StringRef R = Lexer::getSourceText(
915+
CharSourceRange::getTokenRange(Rsr), SM, Context->getLangOpts());
918916
return areStringsSameIgnoreSpaces(L, R);
919917
}
920918
// Left is macro but right is not so they are not same macro or literal

0 commit comments

Comments
 (0)