[PATCH] D33237: [GSoC] Shell autocompletion for clang

Jonathan Roelofs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 07:44:21 PDT 2017


jroelofs added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:472
 def a : Joined<["-"], "a">;
+def autocomplete : Joined<["--"], "autocomplete=">;
 def bind__at__load : Flag<["-"], "bind_at_load">;
----------------
Please add a HelpText so it shows up in the docs.


================
Comment at: clang/test/Driver/autocomplete.c:1
+// RUN: %clang --autocomplete=-fsyn | grep '\-fsyntax-only'
+// RUN: %clang --autocomplete=-s | grep '\-std=.*-stdlib='
----------------
`count` and `FileCheck` are preferred over adding new uses of `grep`.


================
Comment at: clang/utils/bash-autocomplete.sh:1
+_clang()
+{
----------------
Please add a commment explaining that this file should be sourced in the user's `.bashrc`. You also need cmake goop to install this under `share/clang`.


https://reviews.llvm.org/D33237





More information about the llvm-commits mailing list