Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333816

Summary: [c++0x] Double right angle brackets formatting breaks indentation when mixed with comments
Product: [Tools] CDT Reporter: David E. Narvaez <david.narvaez>
Component: cdt-editorAssignee: Anton Leherbauer <aleherb+eclipse>
Status: RESOLVED FIXED QA Contact: Anton Leherbauer <aleherb+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 7.0.1   
Target Milestone: 7.0.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Example file for testing none

Description David E. Narvaez CLA 2011-01-09 21:05:55 EST
Build Identifier: 201009141542

Say you have double right angle brackets (because of a nested template declaration) and then you add a double-slashed comment. If you try auto formatting the source file, an indentation is added to all lines below the comment.

Reproducible: Always

Steps to Reproduce:
1. Declare a nested template variable, e.g., std::vector<std::vector<int>> test
2. Add a comment somewhere below previous declaration in step 1
3. Try auto formatting with Ctrl+Shift+F
Comment 1 David E. Narvaez CLA 2011-01-09 21:08:19 EST
Created attachment 186344 [details]
Example file for testing

The attachment is an example of a file that will be mangled by auto formatting in CDT. Maybe some other test cases may be needed as well, like what happens if you have many of those nested-template declarations.
Comment 2 Anton Leherbauer CLA 2011-01-14 06:55:27 EST
Fixed in HEAD and cdt_7_0.
Comment 4 Anton Leherbauer CLA 2011-01-20 02:36:40 EST
*** Bug 334606 has been marked as a duplicate of this bug. ***