================
@@ -909,10 +909,12 @@ static bool areExprsSameMacroOrLiteral(const 
BinaryOperator *BinOp,
     // Left is macro so right macro too
     if (Rsr.getBegin().isMacroID()) {
       // Both sides are macros so they are same macro or literal
-      const llvm::StringRef L = Lexer::getSourceText(
-          CharSourceRange::getTokenRange(Lsr), SM, Context->getLangOpts(), 0);
-      const llvm::StringRef R = Lexer::getSourceText(
-          CharSourceRange::getTokenRange(Rsr), SM, Context->getLangOpts(), 0);
+      const llvm::StringRef L =
+          Lexer::getSourceText(CharSourceRange::getTokenRange(Lsr), SM,
+                               Context->getLangOpts(), nullptr);
+      const llvm::StringRef R =
+          Lexer::getSourceText(CharSourceRange::getTokenRange(Rsr), SM,
+                               Context->getLangOpts(), nullptr);
----------------
nicovank wrote:

```suggestion
      const llvm::StringRef L = Lexer::getSourceText(
          CharSourceRange::getTokenRange(Lsr), SM, Context->getLangOpts());
      const llvm::StringRef R = Lexer::getSourceText(
          CharSourceRange::getTokenRange(Rsr), SM, Context->getLangOpts());
```

The last argument already has a default value of `nullptr`.

https://github.com/llvm/llvm-project/pull/147793
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to