Author: Alexandre Ganea Date: 2023-01-09T23:45:20-05:00 New Revision: eded23dfdaf050793b70351d5f42400016d57c15
URL: https://github.com/llvm/llvm-project/commit/eded23dfdaf050793b70351d5f42400016d57c15 DIFF: https://github.com/llvm/llvm-project/commit/eded23dfdaf050793b70351d5f42400016d57c15.diff LOG: [Clang] Silence a "unused variable" warning when building with MSVC Added: Modified: clang/lib/Lex/LiteralSupport.cpp Removed: ################################################################################ diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 05575e8d6e2a7..fb2b14601a6ae 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<llvm::UTF32>(&V, 1), Str); + (void)Converted; assert(Converted && "Found a match wich is not a unicode character"); Diag(Diags, Features, Loc, TokBegin, TokRangeBegin, TokRangeEnd, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits