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

QtCreator doesn't find reference to a function

    XMLWordPrintable

Details

    • All

    Description

      QtCreator does not always find usage references to a function. C++14 return type deduction especially seems to confuse it.

      Here's simple C++14 code where QtCreator does not find reference to Test::test() in line 22.

      Clang code model is in use.

      Code completion works ok in line 22 too.

      #include <iostream> 
      
      using namespace std; 
      
      class Test
      {
          public: void test() 
          { 
              cout << "test" << endl; 
          }
      }; 
      
      auto f()
      { 
          return new Test();
      } 
      
      int main()
      {
          auto p = f(); 
          p->test ();     // this reference to Test::test() is not detected
          return 0;
      } 
       

       

       

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              jav Janne Viitala
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes