[clang] efab4a3 - [Sema] Fix -Wunused-variable in SemaType.cpp (NFC)

Jie Fu via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 04:41:32 PDT 2024


Author: Jie Fu
Date: 2024-06-24T19:40:35+08:00
New Revision: efab4a380f36dcd23561633f8bba484036c500f3

URL: https://github.com/llvm/llvm-project/commit/efab4a380f36dcd23561633f8bba484036c500f3
DIFF: https://github.com/llvm/llvm-project/commit/efab4a380f36dcd23561633f8bba484036c500f3.diff

LOG: [Sema] Fix -Wunused-variable in SemaType.cpp (NFC)

/llvm-project/clang/lib/Sema/SemaType.cpp:7625:8:
error: unused variable 'Success' [-Werror,-Wunused-variable]
  bool Success = FX.insert(NewEC, Errs);
       ^
1 error generated.

Added: 
    

Modified: 
    clang/lib/Sema/SemaType.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 426cd0aa91c01..53b9083c95c1b 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -7622,7 +7622,7 @@ handleNonBlockingNonAllocatingTypeAttr(TypeProcessingState &TPState,
   FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo();
   FunctionEffectSet FX(EPI.FunctionEffects);
   FunctionEffectSet::Conflicts Errs;
-  bool Success = FX.insert(NewEC, Errs);
+  [[maybe_unused]] bool Success = FX.insert(NewEC, Errs);
   assert(Success && "effect conflicts should have been diagnosed above");
   EPI.FunctionEffects = FunctionEffectsRef(FX);
 


        


More information about the cfe-commits mailing list