https://llvm.org/bugs/show_bug.cgi?id=31047
Bug ID: 31047 Summary: Improve "x is not a class, namespace, or enumeration" diagnostic. When x is a template class. Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: peetluge...@yandex.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified template<typename T> struct Base { int foo(); }; template<typename T> struct Derived : Base<T> { void bar(); }; template <typename T> void Derived<T>::bar() { Base::foo(); }clang Clang (-std=c++1z -fsyntax-only -Wall): ./test19.cpp:13:3: error: 'Base' is not a class, namespace, or enumeration Base::foo(); ^ ./test19.cpp:2:8: note: 'Base' declared here struct Base { ^ 1 error generated. GCC (v6.2.1): ./test19.cpp: In member function ‘void Derived<T>::bar()’: ./test19.cpp:13:3: error: ‘template<class T> struct Base’ used without template parameters Base::foo(); ^~~~ It would be nice to have diagnostics like gcc which indicates that Base is actually a template but it was used without template parameters. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs