Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20198

Clang Static Analyzer fails on c-files and c++-files with c++17 features

    XMLWordPrintable

Details

    Description

      In my cmake project I have the libtiff c-library as a subdirectory. With the recent release of QtCreator 4.6.0 I tried the clang static analyzer and it produces a ton of errors for the c-files of libtiff:

       

      error: invalid argument '-std=c++14' not allowed with 'C'
      

      which result in errorcode 1.

       

      The use of -std=c++14 is seems to be wrong here. However even for the cpp-files it is used, but that is also wrong as I used set(CMAKE_CXX_STANDARD 17) in my cmakelists.txt to set c++17. MSVC does recognize it and compiles the code just fine.

      clang on the other hand does also report errors for c++17 features.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            yvvan Ivan Donchevskii
            egonuel Immanuel Weber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes