https://llvm.org/bugs/show_bug.cgi?id=25223
Bug ID: 25223 Summary: clang could emit a better diagnostic for (invalid) out-of-class-definition of member functions Product: clang Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: dav...@freebsd.org CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified template<class T> class X { T f(T x) { return x; } T foo(void); }; template<class T> T X::foo(void) { return f(5); } For the code above clang emits the following diagnostic: % ./clang template.cpp -o template -Wall template.cpp:14:3: error: 'X' is not a class, namespace, or enumeration T X::foo(void) ^ template.cpp:2:7: note: 'X' declared here class X { ^ 1 error generated. But X is actually a class, so the error is a little bit misleading. -- 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