[llvm-bugs] [Bug 31734] Clang-CL fails to match types after resolving typedefs

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 24 11:57:01 PST 2017


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

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> ---
Both compilers are correct -- the code is ill-formed, but a compiler is not
required to diagnose it.

The standard says that the dependent portion of a function signature must be
written with the same token sequence in every redeclaration, so the program is
ill-formed. However, to permit implementations to perform certain
canonicalization steps prior to checking, implementations are permitted to also
accept programs where the declaration and definition use different token
sequences that nonetheless must always produce the same type for every possible
substitution.

The full details of the rule are here: http://eel.is/c++draft/temp.over.link#6

-- 
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/20170124/865aa430/attachment.html>


More information about the llvm-bugs mailing list