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

            Bug ID: 52299
           Summary: lambda in unevaluated-context is parsed incorrectedly
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2b
          Assignee: unassignedclangb...@nondot.org
          Reporter: nickhuan...@hotmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

The following code is accepted incorrectly by clang while GCC and MSVC++ all
spot the failure of assertion. The type of "foo<int>" is obviously NOT "void"
at all.


template<class T>
void foo(decltype(+[](T){}) lambda, T param);

static_assert(__is_same(decltype(foo<int>), void));

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to