[LLVMbugs] [Bug 15311] New: problem with parameter-declaration-clause/pack expansion of abstract declarator ambiguity resolution

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 20 04:42:11 PST 2013


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

            Bug ID: 15311
           Summary: problem with parameter-declaration-clause/pack
                    expansion of abstract declarator ambiguity resolution
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vanyacpp at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Clang can not parse this code:

template <typename ...Args>
void foo(void (*...)(Args))
{}

with error message:

1.cpp:2:17: error: expected ')'
void foo(void (*...)(Args))
                ^
1.cpp:2:15: note: to match this '('
void foo(void (*...)(Args))
              ^
1.cpp:2:6: error: declaration type contains unexpanded parameter pack 'Args'
void foo(void (*...)(Args))
     ^               ~~~~
2 errors generated.

When it see ... it haven't seen any unexpanded template parameter packs, so it
doesn't parse ... as part of abstract declarator leaving it to
parameter-declaration-clause.

Funny thing is that november CTP of MSVC 2012 is the only compiler that can
parse this code correctly.

-- 
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/20130220/e2daefd7/attachment.html>


More information about the llvm-bugs mailing list