Don't try to guess the language from given arguments

Authored by aaronpuchert on Oct 15 2017, 8:31 PM.



Before this change, the compiler provider looked up the arguments for a
given language, and passed those to the compiler, where the language was
guessed from the arguments.

Instead we now pass the language together with the arguments into the
function, and no more guessing is needed. Besides being cleaner, it may
not always be possible to guess the language from the given arguments

Diff Detail

R32 KDevelop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
aaronpuchert created this revision.Oct 15 2017, 8:31 PM

Added language flag for Objective C.

apol added a subscriber: apol.Oct 15 2017, 10:31 PM

Makes sense I guess, but I'm not sure what we get...


Make Other the first, this way you don't have to add this random = 100 there if you want.


why did you remove 1 of de dashes?

mwolff accepted this revision.Oct 16 2017, 8:21 AM
mwolff added a subscriber: mwolff.



both man clang and man gcc use this form, and above we also use this form. So I think this change is fine, but should go to a separate patch (commit it directly)

This revision is now accepted and ready to land.Oct 16 2017, 8:21 AM

I don't have commit access yet, so could you commit this for me?


Not a bad idea, but I wanted to leave the enumeration the same for now.

what is your email address, that we can use to associate this commit with you?

If you run arc patch D8317 locally, you should get the commit with all necessary information, including my email address.

This revision was automatically updated to reflect the committed changes.
kfunk added a subscriber: kfunk.Nov 4 2017, 5:12 PM

@aaronpuchert Apparently this Diff here is causing problems in the QML/JS plugin: -- please check.

Somehow I can't find you (or your email address in Bugzilla)

I know that there is a problem, see the discussion on change D8634. The problem is that I'm not sure how to proceed: when do we encounter Utils::Other, and what do we do about it? The Clang Parser can probably not parse a file of type Utils::Other anyway.

I didn't have an account on Bugzilla, that is fixed.


Clang can't really parse Utils::Other files, so there is nothing reasonable we can do here.

Of course we can fix that particular bug by returning an empty string instead.