aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-09-05 14:17:58 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-09-05 15:20:09 +0800
commit69e920d42677872ac39d3475312092404193bf24 (patch)
treec2d5057008d70a69011098109867fdcae89e2ee7 /lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
parentfe70b17fcff043dee11f63a85941d3d927f59deb (diff)
downloadllvm-69e920d42677872ac39d3475312092404193bf24.zip
llvm-69e920d42677872ac39d3475312092404193bf24.tar.gz
llvm-69e920d42677872ac39d3475312092404193bf24.tar.bz2
[Coroutines] Use LookupAllocationFunction to find allocation functions for coroutines consistently
Previously we may call Sema::FindAllocationFunctions directly to lookup allocation functions directly instead of using our wrapped lambda LookupAllocationFunction, which is slightly incosnsistent. It will be helpful to refactor this for further changes. Also previously, when we lookup 'operator new(std::size_t, std::nothrow_t)' in case we found `get_­return_­object_­on_­allocation_­failure` in the promise_type, the compiler will try to look at the allocation function in promise_type. However, this is not wanted actually. According to [dcl.fct.def.coroutine]p10: > if a global allocation function is selected, the > ::operator new(size_­t, nothrow_­t) form is used. So we should only lookup for `::operator (size_t, nothrow_t)` for the global allocation function. For the allocation function in the promise_type, the requirement is that it shouldn't throw, which has already been checked. Given users generally include headers from standard libs so it will generally include the <new> header, so this change should be a trivial one and shouldn't affect almost any user.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp')
0 files changed, 0 insertions, 0 deletions