Fixed in ca8c6156f27003ffa0e24bace2be7c25307f50a3.

On Thu, Jul 21, 2022 at 3:21 PM Manuel Klimek <kli...@google.com> wrote:

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

Reply via email to