[clang] 8529b38 - [Lex] Fix -Wunused-variable for LLVM_ENABLE_ASSERTIONS=off builds after D140179
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 8 15:08:15 PST 2023
Author: Fangrui Song
Date: 2023-02-08T15:08:10-08:00
New Revision: 8529b38f6027e698a37dd24234e1c658c8bd412a
URL: https://github.com/llvm/llvm-project/commit/8529b38f6027e698a37dd24234e1c658c8bd412a
DIFF: https://github.com/llvm/llvm-project/commit/8529b38f6027e698a37dd24234e1c658c8bd412a.diff
LOG: [Lex] Fix -Wunused-variable for LLVM_ENABLE_ASSERTIONS=off builds after D140179
Added:
Modified:
clang/lib/Lex/Preprocessor.cpp
Removed:
################################################################################
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 924a7e69798b..ba55174c8484 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.");
More information about the cfe-commits
mailing list