codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

[[unlikely]] or [[likely]] after if statements break the formatting

Open UnlegitSenpaii opened this issue 1 year ago • 0 comments

Environment

  • Visual Studio version: 2022 Community
  • CodeMaid version: 12.0.3
  • Code language: C++

Description

if (false) [[unlikely]]
{
	bool something = true;
	if (true) [[likely]]
	{
		bool somethingelse = false;
	}
}

gets formatted into

if (false) [[unlikely]]
	{
		bool something = true;
		if (true) [[likely]]
			{
				bool somethingelse = false;
			}
	}

Current behavior

Its formatting wrong.

Expected behavior

It should format correctly.

UnlegitSenpaii avatar Feb 18 '24 07:02 UnlegitSenpaii