[Qt-creator] Fwd: Re: clang code model for syntax highlighting does not work for standard header
fgf
fgf at gmx.net
Mon Jul 17 10:25:16 CEST 2017
I have changed from gcc to clang (4.0) in the kit and the parsing seems
OK now.
Apparently it is the combination of gcc and clang that causes the
problem. Could it be that clang tries to interpret the gcc standard
headers and fails? Maybe one should take provision to always use the
clang header files in syntax checking?
I will file a bug report
Am 17.07.2017 um 09:56 schrieb Nikolai Kosjar:
> On 07/17/2017 09:41 AM, fgf wrote:
>> Thanks for the response.
>>
>> Can the fact that the file compiles correctly not be seen as a proof
>> that the toolchain and kit settings are OK? I have interpreted this a
>> cue that gcc and clang evaluate the same information differently.
>
> In general, yes. But IIRC I had also some strange cases for the code
> model due to some warnings (not errors) there. I'm not too familiar
> with the details there ;)
>
>> The tab "header paths" does not comprise any direct reference to
>> /usr/include but only those five entries
>>
>> -------------------------------------
>>
>> /home/xxx/temp/test_syntax
>>
>> /home/xxx/Qt/Qt5.9.1/5.9.1/gcc_64/include
>>
>> /home/xxx/Qt/Qt5.9.1/5.9.1/gcc_64/include/QtCore
>>
>> /home/xxx/temp/build-test_syntax-5_9_1_64_Bit-Debug
>>
>> /home/xxx/Qt/Qt5.9.1/5.9.1/gcc_64/mkspecs/linux-g++
>>
>> --------------------------------------
>>
>> If this is correct, I will create bugreport
>
> There should be toolchain includes, too. You have only project/qt
> related includes. Please create a report.
>
>> (by the way: Even the standard parser does not find the standard headers
>> unless I include
>> INCLUDEPATH /usr/bin/c++/7.1.1 in the *.pro-File)
>
> Yup, the same logic is behind that for the built-in code model, too.
>
> Nikolai
>
>
More information about the Qt-creator
mailing list