From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10105 invoked by alias); 18 Jun 2018 06:24:32 -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: 43048 Received: (qmail 5331 invoked by uid 1010); 18 Jun 2018 06:24:32 -0000 X-Qmail-Scanner-Diagnostics: from mail-pl0-f66.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.160.66):SA:0(-1.9/5.0):. Processed in 2.352221 secs); 18 Jun 2018 06:24:32 -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=from:to:cc:subject:date:message-id; bh=eSQUVrOays75G29q+7F3UlWPvG7g4o9FCCFokk8oEDc=; b=chE5LUl837fqpJNRNQRS4lLDD8I8pVhy3bvTLzkRlWj9i8vJYt7nip0GV2dMA0CsjO 7cjTFV1ZmUCxv5aq/8yZf6Cu9MhRCkpLtapqrFtYfaE4HOjqvoeuRoTz+wi7JPnjjOVN gDNcacMwmq6soM+ZDNj7SM9eJ6inQJiLn/TtM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eSQUVrOays75G29q+7F3UlWPvG7g4o9FCCFokk8oEDc=; b=m9j//qcNnaJ3JPuLYcZ3XqHE2MohYzKbUaTVrWTGE3LaE0bhcE2GLLCPyNK3i9XQVA aeZyr1SfiuOKhzhfGcqyOgyTYKMCtPFOnnvN/qCjJeW9uSSjJBdhNH85jicG7lwVcTh9 UZUkgP+IBikdMnsERjHBfCoWHJnMlpRE/BclGi9N+JGs10KoycAqdBFM08VczCzs47Ak MFDO/COmeVYeVZUp7eDX1K72fnpXackMJmbPsRBnu26bJA62DQYzwrGvRbWxPTSdKGi0 afV6GZ4/cxFXh+SgnpquNKuUq1V++6dGlXBSY4+zup5sTPVfHpvFcerGKG2yVwcnJ1E5 ovqQ== X-Gm-Message-State: APt69E26TmTRl/Lkb3ci7K7COYxufNVSOjFv9mvHkl2aipptxYmEkEZd HsNj2ZeN6EUTnTvNYBFyALzA6Bxo X-Google-Smtp-Source: ADUXVKJ9hS1nw6ICZ/+WzMn+2Q62hpYsUGkvUB/hI34/PvIgPb8rIRX9XAjq/8tBdYbD9Rtigxm5eg== X-Received: by 2002:a17:902:903:: with SMTP id 3-v6mr3578740plm.106.1529303066658; Sun, 17 Jun 2018 23:24:26 -0700 (PDT) From: Eitan Adler To: zsh-workers@zsh.org Cc: Eitan Adler Subject: [PATCH] _gcc: Improve completer for _clang and _gcc Date: Mon, 18 Jun 2018 05:14:46 +0000 Message-Id: <20180618051446.69512-1-lists@eitanadler.com> X-Mailer: git-send-email 2.17.1 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 + ) +else + args=( + '-flto=-[Enable link-time optimization]::jobs:' + ) + sanitizers=( + address memory + ) fi local -a languages @@ -399,7 +414,7 @@ args+=( '-print-file-name=-[Display the full path to library ]:library:->library' '-print-prog-name=-[Display the full path to compiler component ]:program:' '*-specs=-[Override built-in specs with the contents of ]:file:_files' - '-std=-[assume that the input sources are for specified standard]:standard:(c90 c89 c99 c11 gnu90 gnu89 gnu99 gnu11 c++98 c++03 gnu++98 gnu++03 c++11 gnu++11 c++1y gnu++1y c++14 gnu++14 c++1z gnu++1z c++17 gnu++17 c++2a gnu++2a)' + '-std=-[assume that the input sources are for specified standard]:standard:(c90 c89 iso9899:1990 iso9899:199409 c99 iso9899:1999 c11 iso9899:2011 gnu90 gnu89 gnu99 gnu11 c++98 c++03 gnu++98 gnu++03 c++11 gnu++11 c++1y gnu++1y c++14 gnu++14 c++1z gnu++1z c++17 iso9899:2017 gnu++17 c++2a gnu++2a)' '*-include:include file:_files -g \*.h\(-.\)' '*-imacros:macro input file:_files -g \*.h\(-.\)' '*-idirafter:second include path directory:_files -/' @@ -1034,7 +1049,6 @@ args+=( '-flto-odr-type-merging[Merge C++ types using One Definition Rule]' '-flto-partition=-[Partition symbols and vars at linktime based on object files they originate from]:partitioning algorithm:(1to1 balanced max one none)' '-flto-report[Report various link-time optimization statistics]' - '-flto=-[Enable link-time optimization]::jobs:' '-fmax-errors=-[Maximum number of errors to report]:errors: ' '-fmem-report-wpa[Report on permanent memory allocation in WPA only]' '-fmem-report[Report on permanent memory allocation]' @@ -1061,7 +1075,7 @@ args+=( '-freciprocal-math[Same as -fassociative-math for expressions which include division]' '-frecord-gcc-switches[Record gcc command line switches in the object file]' '-free[Turn on Redundant Extensions Elimination pass]' - '-fsanitize=-[Enable AddressSanitizer, a memory error detector]:style:(address thread)' + "-fsanitize=-[Enable AddressSanitizer, a memory error detector]:style:($sanitizers)" '-fsched-stalled-insns-dep=-[Set dependence distance checking in premature scheduling of queued insns]:instructions: ' '-fsched-stalled-insns=-[Set number of queued insns that can be prematurely scheduled]:instructions: ' '-fsched-verbose=-[Set the verbosity level of the scheduler]:verbosity: ' -- 2.17.1