get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/807242/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 807242,
    "url": "http://patchwork.ozlabs.org/api/patches/807242/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/CADzB+2mQUDKPNznb+Ziqw5T+xCQeOudEXAzOOLmjfNktYaAXqQ@mail.gmail.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<CADzB+2mQUDKPNznb+Ziqw5T+xCQeOudEXAzOOLmjfNktYaAXqQ@mail.gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-29T19:12:32",
    "name": "C++ PATCH for c++/80767, unnecessary instantiation of generic lambda",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b124f0ac29268047397d893bb297893b6fd7f842",
    "submitter": {
        "id": 4337,
        "url": "http://patchwork.ozlabs.org/api/people/4337/?format=api",
        "name": "Jason Merrill",
        "email": "jason@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/CADzB+2mQUDKPNznb+Ziqw5T+xCQeOudEXAzOOLmjfNktYaAXqQ@mail.gmail.com/mbox/",
    "series": [
        {
            "id": 444,
            "url": "http://patchwork.ozlabs.org/api/series/444/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=444",
            "date": "2017-08-29T19:12:32",
            "name": "C++ PATCH for c++/80767, unnecessary instantiation of generic lambda",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/444/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807242/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807242/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-461113-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "mailing list gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461113-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"YzVIfec/\"; dkim-atps=neutral",
            "sourceware.org; auth=none"
        ],
        "Received": [
            "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhdZg0MBqz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 05:13:12 +1000 (AEST)",
            "(qmail 23771 invoked by alias); 29 Aug 2017 19:13:05 -0000",
            "(qmail 23517 invoked by uid 89); 29 Aug 2017 19:13:04 -0000",
            "from mail-it0-f43.google.com (HELO mail-it0-f43.google.com)\n\t(209.85.214.43) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 29 Aug 2017 19:12:54 +0000",
            "by mail-it0-f43.google.com with SMTP id p2so1026518ite.0 for\n\t<gcc-patches@gcc.gnu.org>; Tue, 29 Aug 2017 12:12:54 -0700 (PDT)",
            "by 10.107.181.23 with HTTP; Tue, 29 Aug 2017 12:12:32 -0700 (PDT)"
        ],
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:mime-version:from:date:message-id:subject:to:content-type; q=\n\tdns; s=default; b=NXe6MDzc83eBLeKaKHo4LZktPNOTzakJClBxbB6bz3mV71\n\tMnVQYTlfqYZCAOzitcrzsrr9nWnBOYRDgViaXaGkoj0vvzoxGPxUjHFzQeaFxk6G\n\t4DYQn0DC157XHlhBjcPgkVxy0WhTv+dqu+HAI3bu+FtS55tvKlHGbbZO13TSQ=",
        "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:mime-version:from:date:message-id:subject:to:content-type; s=\n\tdefault; bh=eKozCjoRHiAX6qbCzVrdFKjsZGU=; b=YzVIfec/EN97RieK6sir\n\tWRRWuEzVObR+RlL9zd9qxJVVlPw4UqSjUNbOFk4kogHHRSq+iGXEXhLZ7J/7nBLj\n\tuqQzW8j0whR8Tw4dNX1An7brmGQZAK0uzLg1Djvh7/PGr3celASSYqecCLbVMeIx\n\tO2UnY4sHwT6MkFIzQoAtNJM=",
        "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm",
        "Precedence": "bulk",
        "List-Id": "<gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>",
        "Sender": "gcc-patches-owner@gcc.gnu.org",
        "X-Virus-Found": "No",
        "X-Spam-SWARE-Status": "No, score=-23.9 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=",
        "X-HELO": "mail-it0-f43.google.com",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:mime-version:from:date:message-id:subject:to;\n\tbh=balw60KubyZ9711iM2sGLc9d/0IGxx+Wx3QDxRAomw0=;\n\tb=B7zTTz5UBGFigzioq13ArTPXpIpeEIbLV5nhjBTY92LU69xrnCkXmC2UahTEvbRetH\n\tYdIu1Wm11C1PCq9ESBZfOzJDVKsfFRggfymAGHcBa/E2GHeFWXOIGGnOxEvQGR8nYSeW\n\tx990cM9WLjga/GLtQK8h/vecNlH/OO8TNaJ1NvtclHFDrZQbG6HC+OMHoPx58HHBr2x9\n\tlPFZbdnMsUefExtynWDwXPCJy+fqk29r28bifJel1woV3NcugmRGp/AFBtV0uiYs33RZ\n\tUreWgAByPqfKuGr79H2oZPwM42ZeS3YuIedAkG+GrKfTh2Y22EbzMnELsslkRb231raD\n\twlmg==",
        "X-Gm-Message-State": "AHYfb5h1A+8JK1Z+qwKaGZAAlWZeJwMYzAnihsHax2XpiUe2r+bqt3BY\t0ZKajt3Pywc04X41BwFGyyemm/2H3k6ypAc=",
        "X-Received": "by 10.36.178.93 with SMTP id h29mr5377094iti.158.1504033972720;\n\tTue, 29 Aug 2017 12:12:52 -0700 (PDT)",
        "MIME-Version": "1.0",
        "From": "Jason Merrill <jason@redhat.com>",
        "Date": "Tue, 29 Aug 2017 15:12:32 -0400",
        "Message-ID": "<CADzB+2mQUDKPNznb+Ziqw5T+xCQeOudEXAzOOLmjfNktYaAXqQ@mail.gmail.com>",
        "Subject": "C++ PATCH for c++/80767, unnecessary instantiation of generic lambda",
        "To": "gcc-patches List <gcc-patches@gcc.gnu.org>",
        "Content-Type": "multipart/mixed; boundary=\"f403045d969aacd66c0557e9325d\"",
        "X-IsSubscribed": "yes"
    },
    "content": "In this testcase, when we try to call the object of 'overloader' type,\nwe consider the conversion function from the first lambda to void\n(*)(a) and build up a surrogate call function for it.  We consider how\nto convert from overloader to that type, which means also looking at\nthe template conversion function from the second lambda, which\ninvolves instantiating the operator() to determine the return type,\nwhich is ill-formed.\n\nBut the standard seems to say that we shouldn't bother to consider how\nto do that conversion unless we actually choose the surrogate call\nfunction for that type, so that's what this patch implemenets.\n\nTested x86_64-pc-linux-gnu, applying to trunk.\ncommit b987db09b63a8fc89f0d6cb2712c1ba8ee47eefd\nAuthor: Jason Merrill <jason@redhat.com>\nDate:   Mon Aug 28 17:38:59 2017 -0400\n\n            PR c++/80767 - unnecessary instantiation of generic lambda\n    \n            * call.c (convert_like_real): Call build_user_type_conversion_1 if\n            cand is null.\n            (add_conv_candidate): Build a ck_user conversion with no candidate.",
    "diff": "diff --git a/gcc/cp/call.c b/gcc/cp/call.c\nindex 70c2f86..c446057 100644\n--- a/gcc/cp/call.c\n+++ b/gcc/cp/call.c\n@@ -2278,8 +2278,10 @@ add_conv_candidate (struct z_candidate **candidates, tree fn, tree obj,\n \n       if (i == 0)\n \t{\n-\t  t = implicit_conversion (totype, argtype, arg, /*c_cast_p=*/false,\n-\t\t\t\t   flags, complain);\n+\t  t = build_identity_conv (argtype, NULL_TREE);\n+\t  t = build_conv (ck_user, totype, t);\n+\t  /* Leave the 'cand' field null; we'll figure out the conversion in\n+\t     convert_like_real if this candidate is chosen.  */\n \t  convert_type = totype;\n \t}\n       else if (parmnode == void_list_node)\n@@ -6692,6 +6694,13 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,\n     case ck_user:\n       {\n \tstruct z_candidate *cand = convs->cand;\n+\n+\tif (cand == NULL)\n+\t  /* We chose the surrogate function from add_conv_candidate, now we\n+\t     actually need to build the conversion.  */\n+\t  cand = build_user_type_conversion_1 (totype, expr,\n+\t\t\t\t\t       LOOKUP_NO_CONVERSION, complain);\n+\n \ttree convfn = cand->fn;\n \n \t/* When converting from an init list we consider explicit\ndiff --git a/gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C b/gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C\nnew file mode 100644\nindex 0000000..75ef586\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/cpp1z/lambda-inherit1.C\n@@ -0,0 +1,23 @@\n+// PR c++/80767\n+// { dg-options -std=c++17 }\n+\n+template <typename... Fs> \n+struct overloader : Fs...\n+{\n+    overloader(Fs... fs) \n+        : Fs(fs)...\n+    { } \n+\n+    using Fs::operator()...;\n+};\n+\n+struct a { void foo() { } };\n+struct b { void bar() { } };\n+struct c { void bar() { } };\n+\n+int main() {\n+    overloader{\n+        [](a x) { x.foo(); },\n+        [](auto x) { x.bar(); }\n+    }(a{});\n+}\n",
    "prefixes": []
}