[Lex] Fix -Wunused-variable for LLVM_ENABLE_ASSERTIONS=off builds after D140179
authorFangrui Song <i@maskray.me>
Wed, 8 Feb 2023 23:08:10 +0000 (15:08 -0800)
committerFangrui Song <i@maskray.me>
Wed, 8 Feb 2023 23:08:10 +0000 (15:08 -0800)
clang/lib/Lex/Preprocessor.cpp

index 924a7e6..ba55174 100644 (file)
@@ -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.");