<div dir="ltr">Ping :)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 18, 2022 at 1:22 PM Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Ping :)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 13, 2022 at 11:43 AM Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">This is a functional change, as it removes the debug output when the tokens do not match, which is important for understanding test failures.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 13, 2022 at 1:47 AM Jorge Gorbe Moya via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Jorge Gorbe Moya<br>
Date: 2022-07-12T16:46:58-07:00<br>
New Revision: ee88c0cf09969ba44307068797e12533b94768a6<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/ee88c0cf09969ba44307068797e12533b94768a6" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/ee88c0cf09969ba44307068797e12533b94768a6</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/ee88c0cf09969ba44307068797e12533b94768a6.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/ee88c0cf09969ba44307068797e12533b94768a6.diff</a><br>
<br>
LOG: [NFCI] Fix unused variable/function warnings in MacroCallReconstructorTest.cpp when asserts are disabled.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    clang/unittests/Format/MacroCallReconstructorTest.cpp<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/clang/unittests/Format/MacroCallReconstructorTest.cpp b/clang/unittests/Format/MacroCallReconstructorTest.cpp<br>
index 2bda62aa42be..3abe0383aeae 100644<br>
--- a/clang/unittests/Format/MacroCallReconstructorTest.cpp<br>
+++ b/clang/unittests/Format/MacroCallReconstructorTest.cpp<br>
@@ -91,14 +91,6 @@ struct Chunk {<br>
   llvm::SmallVector<UnwrappedLine, 0> Children;<br>
 };<br>
<br>
-bool tokenMatches(const FormatToken *Left, const FormatToken *Right) {<br>
-  if (Left->getType() == Right->getType() &&<br>
-      Left->TokenText == Right->TokenText)<br>
-    return true;<br>
-  llvm::dbgs() << Left->TokenText << " != " << Right->TokenText << "\n";<br>
-  return false;<br>
-}<br>
-<br>
 // Allows to produce chunks of a token list by typing the code of equal tokens.<br>
 //<br>
 // Created from a list of tokens, users call "consume" to get the next chunk<br>
@@ -110,7 +102,9 @@ struct Matcher {<br>
   Chunk consume(StringRef Tokens) {<br>
     TokenList Result;<br>
     for (const FormatToken *Token : uneof(Lex.lex(Tokens))) {<br>
-      assert(tokenMatches(*It, Token));<br>
+      (void)Token;  // Fix unused variable warning when asserts are disabled.<br>
+      assert((*It)->getType() == Token->getType() &&<br>
+             (*It)->TokenText == Token->TokenText);<br>
       Result.push_back(*It);<br>
       ++It;<br>
     }<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>