Community
Participate
Working Groups
In the following program... ========== void func(long long int num) { num++; //extract printf("%llu",num); } int main(){ long long int num=8223372036854775807; func(num); return 0; } ========== ...if you select line 2 and invoke the Extract Function refactoring, CDT produces the following code: ========== extracted_function(long long int num) { num++; //extract return num; } void func(long long int num) { num = extracted_function(num); printf("%llu",num); } int main(){ long long int num=8223372036854775807; func(num); return 0; } ========== There is not any return type for the extracted function while the expected return type should be long long int. The result in this case is 1486618624 but we expect that to be 8223372036854775808. So, I would expect the extraction would be as follows: ========== long long int extracted_function(long long int num) { num++; //extract return num; } void func(long long int num) { num = extracted_function(num); printf("%llu",num); } int main(){ long long int num=8223372036854775807; func(num); return 0; } ==========