Fix includes for C mode when a -std flag for c++ is set.
requested to merge verner/kdevelop:work/verner/submit/fix-language-standard-for-cpp-modes into master
The languageStandard function would previously honour whatever was explicitly set for the -std flag. However, in case the flag was language-mode specific and the language mode (i.e. C/C++/...) mismatched, this would give an incorrect result.
This commit is a hack to fix this by not honouring the flag if it contains a ++ and the mode is not "C++"-like.
The commit also implements the TODO to handle the -ansi flag.
Edited by Jonathan Verner