Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _gcc: Improve completer for _clang and _gcc
- X-seq: zsh-workers 43055
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Eitan Adler <lists@xxxxxxxxxxxxxx>
- Subject: Re: [PATCH] _gcc: Improve completer for _clang and _gcc
- Date: Mon, 18 Jun 2018 14:37:41 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SufLRGysc310OI4YJlYTtwG3LoLuYIOmrQOp+nIk9c0=; b=VXB2Mm3QXnWRjQF6QsxkhGDLeLWoPWQ7VY2+9MIGkzjAymYBh79ftm5w9o86Hbim2P FUWZzUikIqiC7IK7VVoADIolS0AH+oKR5v90PUYnAjQOesOtQzZMAuX5GuHAd5NFwFO4 u7QnT9mh4h2tb5ncVmZze4hWmpcZak7srdGZoVAsY/0n6ZZU5pMwhPt8ylb10XTrZPE8 Iy/TsuIgwN6/PcIcMYS2xBkNHBuQqHxXaapjwkB7Aw6e+7iTDlcsqEVcZ35ObRGrfIhA 11lfgAqGF0mAd9tHVvj8PMiVdo+bSdcO4pplFbaGEVeqWiWfYswqg8Bu9OU8XGe2y4sK q0Yg==
- In-reply-to: <CAF6rxgn=6tkUBXDum+zG7neKPW98P8iC6AT2mpbbzO8v0UzQfQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180618051446.69512-1-lists@eitanadler.com> <CAHYJk3TFM0-mGzu0OxnBbL=7yR2W45m2-nO+ZYXuy+uymnZLqw@mail.gmail.com> <CAF6rxgn=6tkUBXDum+zG7neKPW98P8iC6AT2mpbbzO8v0UzQfQ@mail.gmail.com>
On Mon, Jun 18, 2018 at 9:49 AM, Eitan Adler <lists@xxxxxxxxxxxxxx> wrote:
> On 18 June 2018 at 00:44, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> On Mon, Jun 18, 2018 at 7:14 AM, Eitan Adler <lists@xxxxxxxxxxxxxx> wrote:
>>> clang - add additional sanitizers
>>> both - add additional standards (basically, aliases)
>>> both - fix -flto
>>>
>>> Signed-off-by: Eitan Adler <lists@xxxxxxxxxxxxxx>
>>> ---
>>> 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, and the
manpage does list all values supported by gcc.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author