]> granicus.if.org Git - clang/commit
Teach overload resolution to prefer user-defined conversion via a
authorDouglas Gregor <dgregor@apple.com>
Wed, 22 Feb 2012 17:32:19 +0000 (17:32 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 22 Feb 2012 17:32:19 +0000 (17:32 +0000)
commitb734e2437d3c4b20a28b448e75cb45ef71f0b518
tree4675c832b46f567514da0975e70fcc4417a34415
parent33deb35535aebe81bed0eaf5c14f3032276a086e
Teach overload resolution to prefer user-defined conversion via a
lambda closure type's function pointer conversion over user-defined
conversion via a lambda closure type's block pointer conversion,
always. This is a preference for more-standard code (since blocks
are an extension)  and a nod to efficiency, since function pointers
don't require any memory management. Fixes PR12063.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151170 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaOverload.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm