[llvm-bugs] [Bug 34338] Problem with name lookup in recursive template function calls.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Aug 27 14:09:26 PDT 2017


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
                 CC|                            |richard-llvm at metafoo.co.uk
             Status|NEW                         |RESOLVED

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
The point of declaration of the 'test' template is after its complete
declarator, so it is not visible in its own trailing return type. Clang's
result is correct.

However, this code violates [basic.scope.class]p2: "A name N used in a class S
shall refer to the same declaration in its context and when re-evaluated in the
completed scope of S. No diagnostic is required for a violation of this rule."

So GCC's behavior is permissible too.

-- 
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/20170827/6d3f6863/attachment.html>


More information about the llvm-bugs mailing list