Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.10.0, Qt Creator 4.11.1, Qt Creator 4.12.0-beta2
-
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
- is duplicated by
-
QTCREATORBUG-23889 Clang code model diagnostics are not properly reported for header files
- Closed
-
QTCREATORBUG-24299 Code navigation jumps to wrong file of same base name
- Closed
- relates to
-
QTCREATORBUG-23876 CMake on QTC 4.12 hardly useable in header files
- Closed
-
QTCREATORBUG-23843 Google Test
- Closed
-
QTCREATORBUG-25803 "This file is not part of any project" warning shown for headers included via paths with symbolic links
- Closed