Page MenuHomePhabricator

[clang] fixing -ast-print for variadic parameter pack in lambda capture
ClosedPublic

Authored by Tyker on May 4 2019, 8:22 PM.

Details

Summary

currently for:

 template<typename ... T>
void f(T... t) {
  auto l = [t...]{};
}

clang -ast-print file.cpp
outputs:

template <typename ...T> void f(T ...t) {
    auto l = [t]         {
        }
;
}

notice that there is not ... in the capture list of the lambda. this patch fixes this issue. and add test for it.

Diff Detail

Repository
rC Clang

Event Timeline

Tyker created this revision.May 4 2019, 8:22 PM
Tyker added a reviewer: rsmith.
Tyker set the repository for this revision to rC Clang.
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2019, 8:23 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rsmith accepted this revision.May 4 2019, 9:05 PM
This revision is now accepted and ready to land.May 4 2019, 9:05 PM
Tyker added a comment.May 5 2019, 4:21 AM

could you commit it for me please ?

You might want to consider getting commit access.

This revision was automatically updated to reflect the committed changes.