Skip to content

Commit

Permalink
[clang][CGBlocks] Remove unused variable "refType" [NFC]
Browse files Browse the repository at this point in the history
Without the change gcc warned like
 ../../clang/lib/CodeGen/CGBlocks.cpp:965:21: warning: unused variable 'refType' [-Wunused-variable]
   965 |     } else if (auto refType = type->getAs<ReferenceType>()) {
       |                     ^~~~~~~
  • Loading branch information
mikaelholmen committed Apr 4, 2024
1 parent e0e615e commit 417a068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CGBlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) {
}

// If it's a reference variable, copy the reference into the block field.
} else if (auto refType = type->getAs<ReferenceType>()) {
} else if (type->getAs<ReferenceType>()) {
Builder.CreateStore(src.emitRawPointer(*this), blockField);

// If type is const-qualified, copy the value into the block field.
Expand Down

0 comments on commit 417a068

Please sign in to comment.