Bug 570624 - Formats Source Code c++ with keyword typeid
Summary: Formats Source Code c++ with keyword typeid
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 9.11.1   Edit
Hardware: PC Windows 10
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-25 12:12 EST by Mikkel Holch CLA
Modified: 2021-01-26 05:46 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikkel Holch CLA 2021-01-25 12:12:07 EST
tryed to describe problem here
https://www.eclipse.org/forums/index.php/m/1837233/#msg_1837233

formatting this code: http://cpp.sh/2vnbe

if formats wrong when hitting keyword "typeid"

This is seen in a ST devtools based on eclipse called STM32CubeIDE 1.5.1
Comment 1 Jonah Graham CLA 2021-01-25 12:38:11 EST
Thanks for the bug report. 

Can you please submit it to owners of STM32CubeIDE? I assume the problem is general, but this should have their attention. 

You example is very long, can you provide a smaller test case? Ideally a stand alone one that I can add to the formatter test suite?
Comment 2 Mikkel Holch CLA 2021-01-26 04:41:01 EST
tryed on small code ?

[code]
void main()
{
	int f;
	for (auto i : array[typeid(f)])
			{
			}
		}
[/code]

i just noticed that this formats correct:

[code]
void main()
{
	int u;
	for (auto i : array[typeid(f)])
	{
	}
}
[/code]
Comment 3 Mikkel Holch CLA 2021-01-26 05:46:16 EST
I have informed ST about the issue in STM32CudeIDE 1.5.1