[LLVMbugs] [Bug 23554] New: clang incorrectly detects a circular template recursion where there is none

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 17 17:13:09 PDT 2015


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

            Bug ID: 23554
           Summary: clang incorrectly detects a circular template
                    recursion where there is none
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: joel.hoener at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14335
  --> https://llvm.org/bugs/attachment.cgi?id=14335&action=edit
File containing code causing the problem

In the attached code clang seems to to be trying to resolve a template
recursion where there is actually none in line 12 (the return type declaration
using decltype). With MSVC12 (2013) and gcc4.9 the same code compiles without
any errors or warnings.

Workaround: Replacing the explicit decltype declaration with C++14's
decltype(auto) results in compilation without errors.

I tested this with clang3.6 on OSX and the 3.7 trunk version on Windows in MSVC
emulation mode with the same outcome.

-- 
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/20150518/511771ba/attachment.html>


More information about the llvm-bugs mailing list