From 8529b38f6027e698a37dd24234e1c658c8bd412a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 8 Feb 2023 15:08:10 -0800 Subject: [PATCH] [Lex] Fix -Wunused-variable for LLVM_ENABLE_ASSERTIONS=off builds after D140179 --- clang/lib/Lex/Preprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 924a7e6..ba55174 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -1497,7 +1497,7 @@ bool Preprocessor::enterOrExitSafeBufferOptOutRegion( // To set the start location of a new region: if (!SafeBufferOptOutMap.empty()) { - auto *PrevRegion = &SafeBufferOptOutMap.back(); + [[maybe_unused]] auto *PrevRegion = &SafeBufferOptOutMap.back(); assert(PrevRegion->first != PrevRegion->second && "Shall not begin a safe buffer opt-out region before closing the " "previous one."); -- 2.7.4