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

False Positives "unknown types" with Clang Code Model

    XMLWordPrintable

Details

    • Windows
    • 951aee8f3a79b0ae66255c9bd1712970ca857299 (qt-creator/qt-creator/4.8)

    Description

      Using the clang code model I get false positives depending on the #include order

       

      #include <QCoreApplication>
      
      // exclude this include and CLANG Code Model is happy...
      // BOOST version 1.52
      #include <boost/math/complex/asin.hpp>
      
      #include <QDir>
      #include <QTextStream>
      
      
      int main(int argc, char *argv[])
         {
         QCoreApplication a(argc, argv);
      
         QDir myDir("Aha");
         QTextStream myTestStream;
      
         return a.exec();
         }
      
      

       

      When including asin.hpp of BOOST 1.52 I get:

      QDir and QTextStream are "unknown" even though they are included. Needless to say, that with "F1" I do not get any help on QDir or QTextStream in the Help sidepanel.

      "F2" does not get me to the declarations.

      But when excluding the include of asin.hpp QDir and QTextStream are recognized by the code model:

       

      And now the "funny" part:
      If I move the includes for QDir and QStream in front of the active include of asin.hpp the code model recognizes QDir and QStream, too!

       

      So somehow the asin.hpp disturbes the clang code model?

      Attachments

        Issue Links

          Activity

            People

              yvvan Ivan Donchevskii
              moellney Michael Möllney
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: