C++: Support default template argument lookup for specialization
This fixes std::vector, although it doesn't really resolve numeric
template arguments. It just picks the first specialization.
Use-case:
class Foo {};
template<class T1 = Foo> class Temp;
template<> class Temp<Foo> { int var; };
void func()
{
Temp<> t;
t.var; // var not highlighted
}
Task-number: QTCREATORBUG-8922
Change-Id: I593515beb3a6d901b6088db8bc1b8e16c39083d3
Reviewed-by:
Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Showing
- src/libs/cplusplus/LookupContext.cpp 55 additions, 39 deletionssrc/libs/cplusplus/LookupContext.cpp
- src/libs/cplusplus/LookupContext.h 6 additions, 1 deletionsrc/libs/cplusplus/LookupContext.h
- src/plugins/cpptools/cppcompletion_test.cpp 13 additions, 0 deletionssrc/plugins/cpptools/cppcompletion_test.cpp
Loading
Please register or sign in to comment