[llvm-bugs] [Bug 47789] Clang 10 disallows modifying const member by an unused member function in a templated class; while Clang 9 allows it

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 11 15:54:27 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47789

Richard Smith <richard-llvm at metafoo.co.uk> changed:

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

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
This is not a bug. The C++ language rules disallow templates that have no valid
instantiations, but don't require implementations to diagnose such problems.

(Clang always intends to diagnose such cases; what happened between Clang 9 and
10 was that we fixed a bug that incorrectly caused this pattern to result in a
dependent class member access. That bugfix then allowed us to diagnose
eagerly.)

For what it's worth, the EDG frontend also rejects this code in its strict
mode.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201011/b51c10a9/attachment.html>


More information about the llvm-bugs mailing list