Author: Kazu Hirata
Date: 2025-11-06T19:58:59-08:00
New Revision: f8e9b89ae07aebf09822b61f18966d2316e7b40e

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

LOG: [CodeGen] Fix a warning

This patch fixes:

  clang/lib/CodeGen/CGBuiltin.cpp:1216:13: error: unused variable
  'CAT' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    clang/lib/CodeGen/CGBuiltin.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index f3eee38bdbd5f..0a2ea416e5e4d 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -1213,7 +1213,7 @@ llvm::Value *CodeGenFunction::emitCountedByPointerSize(
     if (ElementSize.isZero()) {
       // This might be a __sized_by (or __counted_by) on a
       // 'void *', which counts bytes, not elements.
-      auto *CAT = ElementTy->getAs<CountAttributedType>();
+      [[maybe_unused]] auto *CAT = ElementTy->getAs<CountAttributedType>();
       assert(CAT && "must have an CountAttributedType");
 
       ElementSize = CharUnits::One();


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to