Handle empty default arguments correctly

Authored by mtijink on Aug 1 2017, 12:06 PM.



If an empty IndexedString is used as default argument, the default argument is ignored. This allows language plugins to add default arguments even if later arguments do not have defaults.

Diff Detail

R32 KDevelop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
mtijink created this revision.Aug 1 2017, 12:06 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptAug 1 2017, 12:06 PM
brauch added a subscriber: brauch.Aug 1 2017, 9:44 PM

Looks sensible to me.

zhigalin added subscribers: kfunk, zhigalin.

Way better then the previous hack.

Any further comments? I'd like to get this merged.

kfunk accepted this revision.Aug 19 2017, 8:47 AM

Please make sure this doesn't break anything in the C++ language support (i.e. by using the navigation widget on a function with default arguments).

This revision is now accepted and ready to land.Aug 19 2017, 8:47 AM

I checked, navigation still works fine in C++.

This revision was automatically updated to reflect the committed changes.