Skip to content

Commit

Permalink
[clang] Remove unused lambda capture (NFC)
Browse files Browse the repository at this point in the history
llvm-project/clang/lib/Serialization/ASTWriter.cpp:5077:59:
error: lambda capture 'SemaRef' is not used [-Werror,-Wunused-lambda-capture]
    auto AddEmittedDeclRefOrZero = [this, &SemaDeclRefs, &SemaRef](Decl *D) {
                                                       ~~~^~~~~~~
1 error generated.
  • Loading branch information
DamonFool committed Apr 18, 2024
1 parent 6e30d97 commit 609ee9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Serialization/ASTWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5074,7 +5074,7 @@ void ASTWriter::WriteSpecialDeclRecords(Sema &SemaRef) {
// Write the record containing declaration references of Sema.
RecordData SemaDeclRefs;
if (SemaRef.StdNamespace || SemaRef.StdBadAlloc || SemaRef.StdAlignValT) {
auto AddEmittedDeclRefOrZero = [this, &SemaDeclRefs, &SemaRef](Decl *D) {
auto AddEmittedDeclRefOrZero = [this, &SemaDeclRefs](Decl *D) {
if (!D || !wasDeclEmitted(D))
SemaDeclRefs.push_back(0);
else
Expand Down

0 comments on commit 609ee9f

Please sign in to comment.