[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

Francois JEAN via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 15 03:44:12 PDT 2021


Wawha added a comment.

In D104222#2817147 <https://reviews.llvm.org/D104222#2817147>, @MyDeveloperDay wrote:

> @Wawha do you have a project that perhaps uses this work your did? I would like to ensure I didn't break anything

@MyDeveloperDay Good idea!
I just test on my code, and I see 2 types of regressions due to that patch.
This code:

  		auto select = [this]() -> const Library::Object*
  		{
  			return MyAssignment::SelectFromList(this);
  		};

Become:

  		auto select = [this]() -> const Library::Object* {
  			return MyAssignment::SelectFromList(this);
  		};

And this code,

  	auto Items()
  	{
  		return iter::imap(
  			[this](const std::unique_ptr<ItemBase>& iItem) -> T&
  			{
  				return *GetItem(*iItem)->Item;
  			},
  			m_Root->Items());
  	}

Become:

  	auto Items()
  	{
  		return iter::imap(
  			[this](const std::unique_ptr<ItemBase>& iItem) -> T& {
  				return *GetItem(*iItem)->Item;
  			},
  			m_Root->Items());
  	}

I'm surprise, because the both cases, should be present inside the UnitTest.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104222/new/

https://reviews.llvm.org/D104222



More information about the cfe-commits mailing list