zsh-workers
 help / color / mirror / code / Atom feed
From: Shohei YOSHIDA <syohex@gmail.com>
To: zsh-workers@zsh.org
Cc: Shohei YOSHIDA <syohex@gmail.com>
Subject: [PATCH 1/1] Improve -fsanitize option completion
Date: Tue, 24 Jan 2023 11:08:32 +0900	[thread overview]
Message-ID: <20230124020832.221951-2-syohex@gmail.com> (raw)
In-Reply-To: <20230124020832.221951-1-syohex@gmail.com>

- Support comma separated completion
- Accept multiple `-fsanitize` options
---
 Completion/Unix/Command/_gcc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc
index f10000391..8690c5599 100644
--- a/Completion/Unix/Command/_gcc
+++ b/Completion/Unix/Command/_gcc
@@ -1894,7 +1894,7 @@ args+=(
   '-freschedule-modulo-scheduled-loops[enable/disable the traditional scheduling in loops that already passed modulo scheduling]'
   '-frounding-math[disable optimizations that assume default FP rounding behavior]'
   '-frtti[generate run time type descriptor information]'
-  "-fsanitize=-[enable AddressSanitizer, a memory error detector]:style:($sanitizers)"
+  "*-fsanitize=-[enable AddressSanitizer, a memory error detector]:style:->sanitize"
   '-fsched2-use-superblocks[if scheduling post reload, do superblock scheduling]'
   '-fsched-critical-path-heuristic[enable the critical path heuristic in the scheduler]'
   '-fsched-dep-count-heuristic[enable the dependent count heuristic in the scheduler]'
@@ -2284,6 +2284,9 @@ archgeneric)
   arch+=(generic)
   _wanted cputypes expl "CPU type" compadd -a arch && ret=0
   ;;
+sanitize)
+  _values -s , 'sanitizer' $sanitizers
+  ;;
 esac
 
 return ret
-- 
2.37.2



  reply	other threads:[~2023-01-24  2:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24  2:08 [PATCH 0/1] Improve gcc's -fsanitize completion Shohei YOSHIDA
2023-01-24  2:08 ` Shohei YOSHIDA [this message]
2023-01-24  9:06   ` [PATCH 1/1] Improve -fsanitize option completion Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230124020832.221951-2-syohex@gmail.com \
    --to=syohex@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).