Community
Participate
Working Groups
Only the last insertion operation seems to be responsible for the outcome of the extraction. /*$*/a++;/*$$*/ std::cout << a; Above selection is correctly extracted: int extracted (int a) { a++; return a; } But following is incorrectly extracted: /*$*/a++;/*$$*/ std::cout << a << '\n'; -> void extracted(int a) { a++; } Following example with 2 variables shows that it is the last insertion operation that works correctly. /*$*/a++; b++;/*$$*/ std::cout << a << b; -> int extracted(int a, int b) { a++; b++; return b; } but it should be: int extracted(int a, int& b) { a++; b++; return a; } The Set returned by getVariableReadOutside() in NodeContainer does only contain the variable of the last << operation. getFlowInfo(IASTNode node) inside FlowAnalyzer removes the entry of the HashMap. Maybe it can be fixed by changing it to get() instead of remove()