From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18056 invoked by alias); 19 Jun 2018 05:28:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43062 Received: (qmail 16761 invoked by uid 1010); 19 Jun 2018 05:28:11 -0000 X-Qmail-Scanner-Diagnostics: from mail-yw0-f195.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.161.195):SA:0(-1.9/5.0):. Processed in 2.579512 secs); 19 Jun 2018 05:28:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: lists@eitanadler.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=R19xu3e/36CebtQsT91vPWLT80vkJLU/4Abc9cOEaDo=; b=IRPnnziiiP6u3uzzIpc0QolfrRwNiO2+Ee0RKeyFtKiqXp3a6vZpvKtioV13KjBd8w s5jWq/DuBmEU87MAro0PPKJd1b35H6xg/KkEt4fD94nPNYP7MTTizOmqThs5exqNA/iy XrVyl80SFlWxfz9oD/y0R/XTyoY0CrLX3/Hpo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=R19xu3e/36CebtQsT91vPWLT80vkJLU/4Abc9cOEaDo=; b=ljsbozkwg2wd9w29+EXayP9p3nsvieyi7/YT2jkrnmmJiw9QIRjhFyJrMZyvXhvEIV Kw5gcWLSWqf4LL14A2jQjfjlpYlaz7hf9reOVqb4anrsRQXDB3zOM/e/or5eHJO5sHjF 2iwnOUbN6CCuB0rMrt+odshIz5rwocPJPpdg86jKg5Qxi/tFPlZd8WCFDpBsziycn0vZ TPovwZskuO9Vy2+tkfQyYZ49Gw+E9V005qU7KtQOd70QGZTb03YVC7HhFfNRzmh9lQ4E LdPSy9ttb0ivmONngqDDTuiQIbJ6M/aMt+ArplVc3n1TYx/hdyy2qPn5IatQCpYKpoGq x0Qw== X-Gm-Message-State: APt69E3XEEL3aZLje0k8nwHyQm8RBx9zRbtyldT8oCXP6nuvWlNvyO2W /hBj/k964ZxNSytb5aGY4bIUdDyEz7CXnyKw6NbyPQ== X-Google-Smtp-Source: ADUXVKJHmLyPQsSgJAFRIsLI9sWAnBuh8XnfDYvSeMjgWxbgVVNh5Mo0NF+85cmjlq3QWIJoNTDNUzuhBRDw81vpaJE= X-Received: by 2002:a0d:cf01:: with SMTP id r1-v6mr7149703ywd.162.1529386084991; Mon, 18 Jun 2018 22:28:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180618051446.69512-1-lists@eitanadler.com> From: Eitan Adler Date: Mon, 18 Jun 2018 22:27:34 -0700 Message-ID: Subject: Re: [PATCH] _gcc: Improve completer for _clang and _gcc To: Mikael Magnusson Cc: zsh workers Content-Type: text/plain; charset="UTF-8" On 18 June 2018 at 05:37, Mikael Magnusson wrote: > On Mon, Jun 18, 2018 at 9:49 AM, Eitan Adler wrote: >> On 18 June 2018 at 00:44, Mikael Magnusson wrote: >>> On Mon, Jun 18, 2018 at 7:14 AM, Eitan Adler wrote: >>>> clang - add additional sanitizers >>>> both - add additional standards (basically, aliases) >>>> both - fix -flto >>>> >>>> Signed-off-by: Eitan Adler >>>> --- >>>> Completion/Unix/Command/_gcc | 22 ++++++++++++++++++---- >>>> 1 file changed, 18 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc >>>> index a552bb2db..9690df79f 100644 >>>> --- a/Completion/Unix/Command/_gcc >>>> +++ b/Completion/Unix/Command/_gcc >>>> @@ -338,16 +338,31 @@ h8/300) >>>> ;; >>>> esac >>>> >>>> +local -a sanitizers >>>> if [[ "$service" = clang* ]]; then >>>> args=( >>>> $args >>>> - -flto -emit-llvm >>>> + "-flto=-[generate output files suitable for link time optimization]::style:(full thin)" >>>> + -emit-llvm >>>> "-Qunused-arguments[don't emit warning for unused driver arguments]" >>>> --analyze >>>> -fshow-column -fshow-source-location -fcaret-diagnostics -fdiagnostics-fixit-info >>>> -fdiagnostics-parseable-fixits -fdiagnostics-print-source-range-info >>>> -fprint-source-range-info -fdiagnostics-show-option -fmessage-length >>>> ) >>>> + sanitizers=( >>>> + address alignment bool bounds enum float-cast-overflow float-divide-by-zero >>>> + integer-divide-by-zero memory nonnull-attribute null nullability-arg nullability-assign >>>> + nullability-return object-size pointer-overflow return unsigned-integer-overflow >>>> + returns-nonnull-attribute shift signed-integer-overflow unreachable vla-bound vptr >>> >>> Did you mean to add this list under the gcc case? >> >> No. Those are the list supported by clang. I didn't do a full audit, >> but gcc supports fewer of them. It may support more than the list I >> included, but this is not a regression. >> >> Its hard to test gcc since it just errors out with "/usr/local/bin/ld: >> cannot find -lubsan" when testing and I don't want to go down the >> rabbit hole of debugging that right now. > > Well, you remove "thread" and add "memory" instead for gcc, That was a pure mistake. I intended to keep the original > and the > manpage does list all values supported by gcc. Good to know. I see this was committed already, but perhaps let's move it out of the conditional? -- Eitan Adler