[LLVMbugs] [Bug 12240] Clang incorrectly emitting 'is a private member of' error for templated friend class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 27 10:45:45 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12240

Douglas Gregor <dgregor at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Douglas Gregor <dgregor at apple.com> 2012-03-27 12:45:45 CDT ---
Clang is correctly rejecting this ill-formed code. This is a case of

  http://clang.llvm.org/compatibility.html#bad_templates

where Clang is rejecting templates that have no valid instantiations earlier
than GCC. You can see that GCC will eventually produce the same errors if you
force an instantiation of one of the member functions of Parser<T> that Clang
complains about, e.g., by adding:

  template bool Parser<ParserImpl::Dummy>::getBreakOnCommand() const;

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list