Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.7.2, Qt Creator 4.8.1
-
None
-
-
aabdbb7d9ed566f7b4b1b13600674a2ce8832841 (qt-creator/qt-creator/master)
Description
If static template function is declared and used before its definitions later in the source file, symbol highlighting doesn't work between the function declaration and the definition.
Code reproducing the bug:
#include <iostream> template<typename T> void func(T v); // symbol highlighting breaks here int main() { std::cout << "std::cout highlighting doesn't work" << std::endl; func(1); // bug only occurs when the function is used } template<typename T> void func(T v) { // symbol highlighting works again v = 0; std::cout << "std::cout highlighting works correctly" << std::endl; }
The bug only occurs when definition can be found. If the definition is removed (or is for different overload) the highlighting works correctly.