From patchwork Sat Nov 18 02:52:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 839207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-467252-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="iDh1Ocw1"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ydzym5RH6z9s72 for ; Sat, 18 Nov 2017 13:51:44 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=UO1jxPPtzJ1lP/Oi7FNmT9VjiX8scth0r5C40HcVEaD/wZlM5nuT+ BPKQLzw/4vqQ+0biN4G1e1UfDjBZ9p7JD2y+GwZstbU4kI+xWRL7nqxUM6pxX3DU S1hQ8LcKnVZyPIulQOxx9+LmwTF3FkUFl6x5dEhBDDDf2Nurzce7yA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=FKrY0Q+dAWsMNmlthGxMCbmXZE4=; b=iDh1Ocw15GUPgglGwsEu zJcbvuoF0qgnaVv7BHWybnfLgc5ljaSPx1ulrVctt70iia7EG/9HGYDaZplxt1LP /lW2+rQE4Qz5+FS2IOheCcm1B1O15rtlNiKc8UNBJEWqjYa16LsQa20SKN4489X3 yKwbcKV6vSOaeFGUc/7wAac= Received: (qmail 68595 invoked by alias); 18 Nov 2017 02:50:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 68538 invoked by uid 89); 18 Nov 2017 02:50:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:822 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 18 Nov 2017 02:50:50 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EED2EC04AC42; Sat, 18 Nov 2017 02:50:48 +0000 (UTC) Received: from c64.redhat.com (ovpn-112-13.phx2.redhat.com [10.3.112.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5039060BF3; Sat, 18 Nov 2017 02:50:47 +0000 (UTC) From: David Malcolm To: Jason Merrill Cc: Nathan Sidwell , Jakub Jelinek , Richard Biener , gcc-patches List , David Malcolm Subject: [PATCH 05/11] C++: finish_call_expr: strip location wrapper Date: Fri, 17 Nov 2017 21:52:37 -0500 Message-Id: <1510973563-10046-6-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1510973563-10046-1-git-send-email-dmalcolm@redhat.com> References: <1510350329-48956-1-git-send-email-dmalcolm@redhat.com> <1510973563-10046-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes This is needed to recognize calls to known functions, otherwise such calls get erroneously handled by cp_build_function_call_vec. gcc/cp/ChangeLog: * semantics.c (finish_call_expr): Strip any location wrapper from fn. --- gcc/cp/semantics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index dfdc458..f292d17 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2314,6 +2314,8 @@ finish_call_expr (tree fn, vec **args, bool disallow_virtual, gcc_assert (!TYPE_P (fn)); + STRIP_ANY_LOCATION_WRAPPER (fn); + /* If FN may be a FUNCTION_DECL obfuscated by force_paren_expr, undo it so that we can tell this is a call to a known function. */ fn = maybe_undo_parenthesized_ref (fn);