[llvm-bugs] [Bug 28865] clang++ crashes while compiling c++14
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Dec 18 15:01:58 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=28865
Florian Hahn <Florian.Hahn at arm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |Florian.Hahn at arm.com
Resolution|--- |WORKSFORME
--- Comment #2 from Florian Hahn <Florian.Hahn at arm.com> ---
I could not reproduce the segfault with a recent build of clang++ (clang
version 4.0.0 (https://github.com/llvm-mirror/clang.git
7f60b40f08d9c4f13f9b5a7cbbd98468d3345100)
(https://github.com/llvm-mirror/llvm.git
bd807b784e82c1f26339d45f9bf64847f42575e4).
With `clang++ -std=c++14 -c guard.cpp` clang++ produces the following errors:
guard.cpp:19:15: error: cannot initialize return object of type
'result_of_t<(lambda at
guard.cpp:49:37) ()>' with an rvalue of type 'result_of_t<(lambda at
guard.cpp:50:16)
()>'
else return guard(rest...);
^~~~~~~~~~~~~~
guard.cpp:49:24: note: in instantiation of function template specialization
'guard<(lambda at
guard.cpp:49:37), bool, (lambda at guard.cpp:50:16)>' requested here
auto type_mismatch = guard(false, []() { return 5; },
^
1 error generated.
------
Erik's example also produces a proper error message.
I'll close this issue for now.
--
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/20161218/e6bddfb1/attachment.html>
More information about the llvm-bugs
mailing list