From: Alexandre Ganea Date: Tue, 10 Jan 2023 04:45:20 +0000 (-0500) Subject: [Clang] Silence a "unused variable" warning when building with MSVC X-Git-Tag: upstream/17.0.6~21598 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eded23dfdaf050793b70351d5f42400016d57c15;p=platform%2Fupstream%2Fllvm.git [Clang] Silence a "unused variable" warning when building with MSVC --- diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 05575e8..fb2b146 100644 --- a/clang/lib/Lex/LiteralSupport.cpp +++ b/clang/lib/Lex/LiteralSupport.cpp @@ -515,8 +515,9 @@ static void DiagnoseInvalidUnicodeCharacterName( std::string Str; llvm::UTF32 V = Match.Value; - LLVM_ATTRIBUTE_UNUSED bool Converted = + bool Converted = llvm::convertUTF32ToUTF8String(llvm::ArrayRef(&V, 1), Str); + (void)Converted; assert(Converted && "Found a match wich is not a unicode character"); Diag(Diags, Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd,