Re: [Qt-creator] Clang Static Analyzer does not find STL headers
On 11/04/2017 03:03 PM, Christian Gagneraud wrote: On 5 November 2017 at 01:40, Benjamin TERRIERwrote: 2017-11-03 18:07 GMT+01:00 Nikolai Kosjar : There is not much configuration for the clang static analyzer. Please create a bug report with: * used versions of Qt Creator and configured clang version for the analyzer * whether this already happens with a "normal" toolchain. If not, please provide some information how to set up your used toolchain. Hi Nikolai, Benjamin What is a "normal toolchain", Boot2Qt, Yocto, Qbs or own QtC sauce? Hi! I've just meant a tool chain targeting the desktop. The one that you get as auto-detected "Desktop Kit" if you install Qt + Qt Creator. Nikolai ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
Re: [Qt-creator] Clang Static Analyzer does not find STL headers
05.11.2017, 02:23, "Christian Gagneraud": > On 5 November 2017 at 03:03, Christian Gagneraud wrote: >> On 5 November 2017 at 01:40, Benjamin TERRIER wrote: >>> 2017-11-03 18:07 GMT+01:00 Nikolai Kosjar : There is not much configuration for the clang static analyzer. Please create a bug report with: * used versions of Qt Creator and configured clang version for the analyzer * whether this already happens with a "normal" toolchain. If not, please provide some information how to set up your used toolchain. >> >> Hi Nikolai, Benjamin >> >> What is a "normal toolchain", Boot2Qt, Yocto, Qbs or own QtC sauce? > > Or maybe you meant a non-bare-metal toolchain? Or a toolchain that > does not involved Qt/qmake? Or... When people say "toolchain" without further clarification, they usually mean compiler toolchain which consists of preprocessor, compiler, assembler, and linker > > Chris > ___ > Qt-creator mailing list > Qt-creator@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qt-creator -- Regards, Konstantin ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
Re: [Qt-creator] Clang Static Analyzer does not find STL headers
On 5 November 2017 at 03:03, Christian Gagneraudwrote: > On 5 November 2017 at 01:40, Benjamin TERRIER wrote: >> 2017-11-03 18:07 GMT+01:00 Nikolai Kosjar : >>> >>> There is not much configuration for the clang static analyzer. >>> >>> Please create a bug report with: >>> * used versions of Qt Creator and configured clang version for the analyzer >>> * whether this already happens with a "normal" toolchain. If not, please >>> provide some information how to set up your used toolchain. > > Hi Nikolai, Benjamin > > What is a "normal toolchain", Boot2Qt, Yocto, Qbs or own QtC sauce? Or maybe you meant a non-bare-metal toolchain? Or a toolchain that does not involved Qt/qmake? Or... Chris ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
Re: [Qt-creator] Clang Static Analyzer does not find STL headers
On 5 November 2017 at 01:40, Benjamin TERRIERwrote: > 2017-11-03 18:07 GMT+01:00 Nikolai Kosjar : >> >> There is not much configuration for the clang static analyzer. >> >> Please create a bug report with: >> * used versions of Qt Creator and configured clang version for the analyzer >> * whether this already happens with a "normal" toolchain. If not, please >> provide some information how to set up your used toolchain. Hi Nikolai, Benjamin What is a "normal toolchain", Boot2Qt, Yocto, Qbs or own QtC sauce? Chris ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
Re: [Qt-creator] Clang Static Analyzer does not find STL headers
2017-11-03 18:07 GMT+01:00 Nikolai Kosjar: > > There is not much configuration for the clang static analyzer. > > Please create a bug report with: > * used versions of Qt Creator and configured clang version for the analyzer > * whether this already happens with a "normal" toolchain. If not, please > provide some information how to set up your used toolchain. > > Thanks, >Nikolai Done: https://bugreports.qt.io/browse/QTCREATORBUG-19220 2017-11-03 23:29 GMT+01:00 Christian Gagneraud : > Are you trying to substitute a gcc cross-compiler with a native clang > compiler? > > Have you tried to use gcc's -isysroot that point to the tooolchain > installation prefix? > > There's as well a few clang-static-analyser and/or scan-build options > such as --analyzer-target --triplet, ... > I don't have the recipe at hand, but AFAIR you need to tell clang that > this is cross compiled. > > Chris I am trying to use the clang.exe that is installed with Qt Creator by using the Static Analyzer function of Qt Creator. I have no direct control of the command line that is used to invoke clang. All I can do is configure Qt Creator to use my gcc toolchain and change my project file. But clang seems to handle it properly, if you exclude the header issue. ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
Re: [Qt-creator] Clang Static Analyzer does not find STL headers
On 4 November 2017 at 06:07, Nikolai Kosjarwrote: > On 11/03/2017 11:06 AM, Benjamin TERRIER wrote: >> >> Hi, >> >> I have an arm-none-eabi gcc toolchain. I have successfully configured Qt >> Creator >> to use it in a Kit and was able to use it to build QBS projects. >> >> However, when I try to run the static analyzer, clang does not find >> the standard headers: >> >> main.cpp:9:10: fatal error: 'cstring' file not found >> >> A solution is to add the include paths of the standard headers in the >> QBS project: >> >> cpp.includePaths: [ >> >> ".../toolchain/arm/arm-gnu-toolchain/arm-none-eabi/include/c++/6.3.1", >> ".../toolchain/arm/arm-gnu-toolchain/arm-none-eabi/include", >> ] >> >> But this is a bit ugly. >> >> Is there some configuration I missed (I guess not since the build >> works), or is it a known bug ? Are you trying to substitute a gcc cross-compiler with a native clang compiler? Have you tried to use gcc's -isysroot that point to the tooolchain installation prefix? There's as well a few clang-static-analyser and/or scan-build options such as --analyzer-target --triplet, ... I don't have the recipe at hand, but AFAIR you need to tell clang that this is cross compiled. Chris > > > There is not much configuration for the clang static analyzer. > > Please create a bug report with: > * used versions of Qt Creator and configured clang version for the analyzer > * whether this already happens with a "normal" toolchain. If not, please > provide some information how to set up your used toolchain. > > Thanks, >Nikolai > > ___ > Qt-creator mailing list > Qt-creator@qt-project.org > http://lists.qt-project.org/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
Re: [Qt-creator] Clang Static Analyzer does not find STL headers
On 11/03/2017 11:06 AM, Benjamin TERRIER wrote: Hi, I have an arm-none-eabi gcc toolchain. I have successfully configured Qt Creator to use it in a Kit and was able to use it to build QBS projects. However, when I try to run the static analyzer, clang does not find the standard headers: main.cpp:9:10: fatal error: 'cstring' file not found A solution is to add the include paths of the standard headers in the QBS project: cpp.includePaths: [ ".../toolchain/arm/arm-gnu-toolchain/arm-none-eabi/include/c++/6.3.1", ".../toolchain/arm/arm-gnu-toolchain/arm-none-eabi/include", ] But this is a bit ugly. Is there some configuration I missed (I guess not since the build works), or is it a known bug ? There is not much configuration for the clang static analyzer. Please create a bug report with: * used versions of Qt Creator and configured clang version for the analyzer * whether this already happens with a "normal" toolchain. If not, please provide some information how to set up your used toolchain. Thanks, Nikolai ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator
[Qt-creator] Clang Static Analyzer does not find STL headers
Hi, I have an arm-none-eabi gcc toolchain. I have successfully configured Qt Creator to use it in a Kit and was able to use it to build QBS projects. However, when I try to run the static analyzer, clang does not find the standard headers: main.cpp:9:10: fatal error: 'cstring' file not found A solution is to add the include paths of the standard headers in the QBS project: cpp.includePaths: [ ".../toolchain/arm/arm-gnu-toolchain/arm-none-eabi/include/c++/6.3.1", ".../toolchain/arm/arm-gnu-toolchain/arm-none-eabi/include", ] But this is a bit ugly. Is there some configuration I missed (I guess not since the build works), or is it a known bug ? Thanks, Best regards, Benjamin ___ Qt-creator mailing list Qt-creator@qt-project.org http://lists.qt-project.org/mailman/listinfo/qt-creator