This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Open llvm39 project. Go to SymbolTableListTraits class (SymbolTableListTraits.h:71). View hierarchy. It shows ~7 specializations. But when you click to each one, you get to a declaration like friend class SymbolTableListTraits<BasicBlock>; That's very frustrating.
The "T" annotation in the left editor gutter behaves exactly the same. A simple example is shown below template <typename NodeTy> struct ilist_embedded_sentinel_traits { void some_stuff(); }; template<typename NodeTy> class ilist_node { friend struct ilist_embedded_sentinel_traits<NodeTy>; void some_other_stuff(); };
Another example that shows this (compilable and even runnable). Moreover, in this example ONLY forward is shown, but traits<Function> and traits<Variable> are not. #include <iostream> using namespace std; class Function {}; class Variable {}; // has a gray "T" but navigates ONLY to the line 16 template <typename NodeTy> struct traits { public: static void echo() { cout << "Generic" << endl; } }; template<typename NodeTy> class list { public: friend struct traits<NodeTy>; void some_other_stuff(); }; template <> class traits<Function> { // has a green "T" public: static void echo() { cout << "Function" << endl; } }; template <> class traits<Variable> { // has a green "T" public: static void echo() { cout << "Variable" << endl; } }; int main(int argc, char** argv) { traits<int>::echo(); traits<Function>::echo(); traits<Variable>::echo(); return 0; }
(In reply to Vladimir Kvashin from comment #2) > Moreover, in this example ONLY forward is shown, but traits<Function> and > traits<Variable> are not. That's quite a different problem. I mixed "class" and "struct" in the code in comment #2, this made model behave that way. It's a different probleml; I've just submitted an issue #270875 in this respect. The correct example for this issue is as follows. #include <iostream> using namespace std; class Function {}; class Variable {}; template <typename NodeTy> class traits { public: static void echo() { cout << "Generic" << endl; } }; template<typename NodeTy> class list { public: friend class traits<NodeTy>; void some_other_stuff(); }; template <> class traits<Function> { public: static void echo() { cout << "Function" << endl; } }; template <> class traits<Variable> { public: static void echo() { cout << "Variable" << endl; } }; int main(int argc, char** argv) { traits<int>::echo(); traits<Function>::echo(); traits<Variable>::echo(); return 0; }
Fixed in cnd-main http://hg.netbeans.org/cnd-main/rev/8e56290210ce
Integrated into 'main-silver', will be available in build *201707201608* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8e56290210ce User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fixed #270874 - Do not show friend (forwad) class declarations in class hierarchy view