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

Clang Static Analyzer does not respect built-in GCC defines

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 7.0.0
    • None
    • All

    Description

      My projects which are built for MIPS24 targets are not completely parsed by Clang, resulting in lot of errors in editor. It is worth to mention that compilation is done successfully each time.

      Exact problem is inside `gnu/stubs.h` (that's OpenWRT toolchain)  where Clang supposes that `_mips_hard_float` is defined and therefore it is trying to include `stubs-o32_hard.h` (which is missing) instead of `stubs-o32_soft.h` which is present and should be included instead (once `_mips_soft_float` is defined).
      When I check C++ code model defines in Qt Creator, as well as print GCC defines for the toolchain, in both cases `__mips_soft_float` is defined.

       

      Steps to reproduce:
      1. Create and build OpenWRT toolchain for MIPS24 platform (exact target is `8dev_rambutan` but it will probably happen for many others)
      2. Add a kit for the target.

      3. Create a simple program and make an include

      #include <iostream>

      there.

       

       

      Is it also very similar to this bug https://bugreports.qt.io/browse/QTCREATORBUG-17797

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            Vavooon Volodymyr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes