[clang] 7926c0b - [Sema] Fix -Wunused-but-set-variable after #94865
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 1 10:25:40 PDT 2024
Author: Fangrui Song
Date: 2024-07-01T10:25:36-07:00
New Revision: 7926c0b594203ca1efe3d2a73a3f4066363bac5a
URL: https://github.com/llvm/llvm-project/commit/7926c0b594203ca1efe3d2a73a3f4066363bac5a
DIFF: https://github.com/llvm/llvm-project/commit/7926c0b594203ca1efe3d2a73a3f4066363bac5a.diff
LOG: [Sema] Fix -Wunused-but-set-variable after #94865
Added:
Modified:
clang/lib/Sema/SemaLambda.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index 0795daa8403d1..56818042952a6 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -1246,7 +1246,7 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro,
if (auto *BD = R.getAsSingle<BindingDecl>())
Var = BD;
- else if (auto *FD = R.getAsSingle<FieldDecl>()) {
+ else if (R.getAsSingle<FieldDecl>()) {
Diag(C->Loc, diag::err_capture_class_member_does_not_name_variable)
<< C->Id;
continue;
More information about the cfe-commits
mailing list