Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333816 - [c++0x] Double right angle brackets formatting breaks indentation when mixed with comments
Summary: [c++0x] Double right angle brackets formatting breaks indentation when mixed ...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 7.0.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.0.2   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
: 334606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-09 21:05 EST by David E. Narvaez CLA
Modified: 2011-01-20 02:36 EST (History)
1 user (show)

See Also:


Attachments
Example file for testing (100 bytes, text/x-c)
2011-01-09 21:08 EST, David E. Narvaez CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***