From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107905 invoked by alias); 15 Jun 2017 16:57:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 107895 invoked by uid 89); 15 Jun 2017 16:57:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f177.google.com Received: from mail-qt0-f177.google.com (HELO mail-qt0-f177.google.com) (209.85.216.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Jun 2017 16:57:43 +0000 Received: by mail-qt0-f177.google.com with SMTP id u12so28286132qth.0 for ; Thu, 15 Jun 2017 09:57:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=63UtPtZ24N0hEEVaOnLcPmA24zq6RjfiB6I/hAXOeWo=; b=XISvL7KrluInJnwlk+GhwWl38eujNHa2Ml70rzqV031fhjshm8cglTLppL4KK4wpbf sJUhhMXS7WU/5vKAIgppD4rbB2x3v7G/TtQWMbtbgvvwrhebz3Q37Yv1v4/yz8Mnwv8t T8ooes/Yx7PyxN/bp/hlYV8dBePnPPN8BcbyzBeJ0cAI3LvmMW/gMdrYVtwO12G/0H3q V1fDIBhpEaBtEIQkbfTpCMur59NyY9IT2c8vdsL5kgjnd98KQuAovmtDyuL7DVkme5QF 0f9GK2S47AIe8DahFlynj8o5V459qjjvywfQ0y0lnhh6hz1jur6acHmYomJEJgQ3Kri7 3A0A== X-Gm-Message-State: AKS2vOxRlFMPEegQqn3cUYkpw5r+gBxdWBUh9j6qQnXpVmiaL/+TCOzS fBgoy7Bf8oEKvA== X-Received: by 10.237.34.39 with SMTP id n36mr7777020qtc.29.1497545866618; Thu, 15 Jun 2017 09:57:46 -0700 (PDT) Received: from localhost.localdomain (184-96-144-212.hlrn.qwest.net. [184.96.144.212]) by smtp.gmail.com with ESMTPSA id n3sm408468qkd.21.2017.06.15.09.57.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 09:57:46 -0700 (PDT) To: Gcc Patch List , Jason Merrill From: Martin Sebor Subject: [PATCH] document cp_operator_id and cp_assignment_operator_id Message-ID: <620e2b9e-a77e-167d-52e3-0b34efa688a5@gmail.com> Date: Thu, 15 Jun 2017 16:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------073C159A423925A34DB63FA2" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01133.txt.bz2 This is a multi-part message in MIME format. --------------073C159A423925A34DB63FA2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 136 Attached is a documentation-only change to add comments explaining the C++ cp_operator_id and cp_assignment_operator_id macros. Martin --------------073C159A423925A34DB63FA2 Content-Type: text/x-patch; name="gcc-cp_operator_id-doc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gcc-cp_operator_id-doc.diff" Content-length: 1045 gcc/cp/ChangeLog: * cp-tree.h (cp_operator_id, cp_assignment_operator_id): Document. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index da45d95..234441b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1731,9 +1731,16 @@ struct GTY(()) language_function { || (NAME) == cp_operator_id (DELETE_EXPR) \ || (NAME) == cp_operator_id (VEC_DELETE_EXPR)) +/* Evaluates to an id matching operator CODE. Used to obtain the set + of operator overloads for the specified CODE. */ #define cp_operator_id(CODE) \ (operator_name_info[(int) (CODE)].identifier) -#define cp_assignment_operator_id(CODE) \ + +/* An id matching a member assignment operator CODE, both simple (with + CODE == NOP_EXPR) and compound (e.g., with CODE == PLUS_EXPR for +=). + Includes copy assignment. Use copy_fn_p() to test specifically for + copy assignment. */ +#define cp_assignment_operator_id(CODE) \ (assignment_operator_name_info[(int) (CODE)].identifier) /* In parser.c. */ extern tree cp_literal_operator_id (const char *); --------------073C159A423925A34DB63FA2--