Page MenuHomePhabricator

[ASTImporter] Fix import of lambda in function param

Authored by martong on Jul 2 2019, 6:20 AM.



The current import implementation fails to import the definition of a
lambda class if the lambda class is defined in a function param.
E.g., the lambda class below will be imported without any methods:

template <typename F>
void f(F L = [](){}) {}

Diff Detail


Event Timeline

martong created this revision.Jul 2 2019, 6:20 AM
Herald added a reviewer: shafik. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript

Hello Gabor,
There is an inline question about tests; other code looks fine.

1713 ↗(On Diff #207540)

Two spaces after 'the'.

5103 ↗(On Diff #207540)

Can we use std::distance instead?

martong marked 3 inline comments as done.Jul 3 2019, 6:28 AM

Thanks for the review Alexei!

5103 ↗(On Diff #207540)

Thanks! I've changed it.

martong updated this revision to Diff 207776.Jul 3 2019, 6:28 AM
martong marked an inline comment as done.
  • 'the ' -> 'the '
  • Use std::distance()
a_sidorin accepted this revision.Jul 7 2019, 2:56 PM
This revision is now accepted and ready to land.Jul 7 2019, 2:56 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2019, 5:49 AM