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

Follow symbol under cursor mismatch functions in different subprojects

    XMLWordPrintable

Details

    • 4cad094066370fd177e3cb7fde64fd80e05eee84 (qt-creator/tqtc-qt-creator/master)

    Description

      In a cmake project with 2 targets and each of them has the same class Test:

      • Executable 1
        • Test.cpp – contains a main() and a Test class with member function function
        • Test.h
      • Executable 2
        • Test.cpp – contains a main() and a Test class with member function function
        • Test.h

       

      The 2 executable are completely unrelated c++ wise.

      Despite this, in QtCreator after having opened the project, when going in executable 1's Test.h file and doing "Follow symbol under cursor" over the function member function of Test class, it goes to the implementation of executable 2's Test::function instead of executable 1's.

       

      Using the attached small project clang-code-model-bad-follow-check_flags.zip , I reproduce the issue with QtCreator 4.10.0, 4.11.1 and 4.12.0-beta2.

      Just open Test.h in both exe1 and exe2:

      • I expect "Follow Symbol Under Cursor" on Test::function or c_function to open the matching Test.cpp of the same folder
      • But For one of the Test.h files, it will open the Test.cpp file of the other executable

      Attachments

        Issue Links

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

          Activity

            People

              cadam Cristian Adam
              amurzeau Alexis Murzeau
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes