struct Question { int answer(); }; template<typename T> struct Foo { Question* question(); int fortyTwo() { auto x = question(); return x->answer(); } }; If I have a class template with a method ('fortyTwo') calling another ('question'), the tooltip on 'question' shows the correct type, but it seems the type of the function call as an expression is unknown. Therefore, the type of 'x' is unknown (tooltip says 'auto'), and 'answer' is not highlighted (remains black). This only happens if Foo is a template, but happens even if nothing in the class actually depends on T (as in the example). "return question()->answer();" shows the same problem, but with "auto" it's clearer that the problem is the type of the returned value. An example of real-world code showing this problem is KDevelop::AbstractContextBuilder<T>::topContext(). It returns "currentContext()->topContext();", and the 'topContext' there is not highlighted. I'm using libclang 3.8.1.
I can confirm this. Using clang master.
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
In VS-Code I also get `x` as type `auto` so it's probably a clang indexer issue.
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!