Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353352 - CFG doesn't handle range-based for
Summary: CFG doesn't handle range-based for
Status: CLOSED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: 8.6.0   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
: 441824 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-28 14:01 EDT by Tomasz Wesolowski CLA
Modified: 2016-05-17 16:14 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Wesolowski CLA 2011-07-28 14:01:19 EDT
The CFG doesn't support this C++0x construct:

void foo() {
    int arr[] = {1,2,3};
    for (int i : arr) {
        ; // ...
    }
}
Comment 1 Sergey Prigogin CLA 2014-08-15 11:46:57 EDT
Until very recently ControlFlowGraphBuilder printed an error message to stderr when it encountered a range-based 'for' statement. I added a stub code to avoid that but I don't know how to build the graph properly.

Alena, do you have time to take a look at it?
Comment 2 Sergey Prigogin CLA 2014-08-15 11:47:30 EDT
*** Bug 441824 has been marked as a duplicate of this bug. ***
Comment 3 Elena Laskavaia CLA 2014-08-22 22:26:47 EDT
Yeah, I can look at it
Comment 4 Elena Laskavaia CLA 2016-05-17 16:14:35 EDT
commit d2f248dc70dce74281384a5ad1243c346a872081
Since 8.6