Skip to content

Commit f8e9b89

Browse files
[CodeGen] Fix a warning
This patch fixes: clang/lib/CodeGen/CGBuiltin.cpp:1216:13: error: unused variable 'CAT' [-Werror,-Wunused-variable]
1 parent 630f43a commit f8e9b89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ llvm::Value *CodeGenFunction::emitCountedByPointerSize(
12131213
if (ElementSize.isZero()) {
12141214
// This might be a __sized_by (or __counted_by) on a
12151215
// 'void *', which counts bytes, not elements.
1216-
auto *CAT = ElementTy->getAs<CountAttributedType>();
1216+
[[maybe_unused]] auto *CAT = ElementTy->getAs<CountAttributedType>();
12171217
assert(CAT && "must have an CountAttributedType");
12181218

12191219
ElementSize = CharUnits::One();

0 commit comments

Comments
 (0)