[Qt-creator] Clang code model running in C++98 mode

Julius Bullinger julius.bullinger at mvtec.com
Tue Nov 6 13:51:40 CET 2018



On 06.11.2018 12:19, Nikolai Kosjar wrote:
> On 11/6/18 11:41 AM, Julius Bullinger wrote:
>> Hi,
>>
>> we have a medium-sized qmake project (about 300 .pri/.pro files), which
>> all contain "CONFIG += c++11". However, the clang code model doesn't
>> seem to catch that, and runs in C++98 mode regardless:
>>
>> CTRL+Shift+F12 > Projects Parts > General > Language Version: CXX98
>>
>> This causes hundreds of errors and warnings in the editor about C++11
>> extensions and unknown types. With the traditional code model, the
>> project is detected as C++11/14 correctlty.
> 
> Recently there were some changes in that area. Could you please try
> again with the updated snapshots for 4.8?

I forgot to mention that, it also happens with the latest 4.8 snapshot 
(2581).

>> I can't reproduce it with a smaller project, but is there any way I can
>> debug this issue? Like get the options that are passed from qmake to the
>> code model?
> 
> A breakpoint in ProjectInfoGenerator::createProjectPart() should help,
> especially on
> 
> 	part->languageVersion = macroInspectionReport.languageVersion;

Well, I'd need to built Creator myself for that. I'll have to see if 
that's feasible. Thanks for the pointer, though!

Regards,
Julius



More information about the Qt-creator mailing list