[LLVMbugs] [Bug 12064] clang marks globals as used in lambda in unused default argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 11 22:52:16 PDT 2014


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

Nikola Smiljanić <popizdeh at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |popizdeh at gmail.com
         Resolution|---                         |FIXED

--- Comment #1 from Nikola Smiljanić <popizdeh at gmail.com> ---
r208386 gives:
test.cpp:1:30: error: void function 'f' should not return a value
[-Wreturn-type]
template<typename T> T f() { return "Cause Error"; }
                             ^      ~~~~~~~~~~~~~
test.cpp:2:32: note: in instantiation of function template specialization
'f<void>' requested here
void g(void (*)() = []{ return f<void>(); });
                               ^

-- 
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/20140512/280aaf1f/attachment.html>


More information about the llvm-bugs mailing list