Bug 292262 - Source formatter doesn't handle C++11 ranged for loops properly
Summary: Source formatter doesn't handle C++11 ranged for loops properly
Status: RESOLVED UPSTREAM
Alias: None
Product: kdevelop
Classification: Applications
Component: All editors (show other bugs)
Version: git master
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 11:13 UTC by Chris Clearwater
Modified: 2012-01-28 18:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Clearwater 2012-01-23 11:13:55 UTC
Version:           git master (using KDE 4.7.3) 
OS:                Linux

See reproducability

Reproducible: Didn't try

Steps to Reproduce:
The following code is entered into a cpp file:

#include <vector>

int main(void)
{
    std::vector<bool> v;
    for (auto x : v) {}
    for (;;) {}
    return 0;
}

Then run "Edit->Reformat Source"

Actual Results:  
The C++11 ranged for is placed at the beginning of the line while the traditional for is properly indented

Expected Results:  
For both for statements to be properly indented
Comment 1 Milian Wolff 2012-01-26 21:20:51 UTC
this is true, but please report this upstream to the astyle people. once they have fixed it we can update our libastyle and should get the fix as well.

cheers
Comment 2 Chris Clearwater 2012-01-28 18:46:55 UTC
I wasn't aware KDevelop used an external library for this. It appears the bug is already reported on their bug tracker. See http://sourceforge.net/tracker/?func=detail&aid=3458402&group_id=2319&atid=102319