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

Bug 353352

Summary: CFG doesn't handle range-based for
Product: [Tools] CDT Reporter: Tomasz Wesolowski <kosashi>
Component: cdt-codanAssignee: Elena Laskavaia <elaskavaia.cdt>
Status: CLOSED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: cdtdoug, eclipse.sprigogin, notifications+eclipse.org, yevshif
Version: 8.0   
Target Milestone: 8.6.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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