[PATCH] D33383: [GSoC] Flag value completion for clang

Yuka Takahashi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 17 23:13:02 PDT 2017


yamaguchi updated this revision to Diff 102958.
yamaguchi marked 10 inline comments as done.
yamaguchi added a comment.

Cleaned suggestValueCompletions and bash-autocomplete.sh, and added tests.

We have passed flags and values from bash to clang like `clang --autocomplete=l,=,-stdlib`, but I've changed this to pass `clang --autocomplte=-stdlib=,l` instead. This is more simple.

Added support and test for -meabi flag.
This flag is corner case, because it doesn't take `=` suffix like `-stdlib=`.

When `clang -stdlib=[tab]` is pushed, we would give possible values (libstd++,..), and when `clang -stdlib= [tab]` is pushed, we just give files under current directory.
And when `clang -meabi [tab]` is pushed, we give possible values (gnu,..).


https://reviews.llvm.org/D33383

Files:
  clang/include/clang/Driver/Options.h
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/DriverOptions.cpp
  clang/test/Driver/autocomplete.c
  clang/utils/bash-autocomplete.sh
  lld/COFF/Driver.h
  lld/COFF/DriverUtils.cpp
  lld/ELF/Driver.h
  lld/ELF/DriverUtils.cpp
  lld/lib/Driver/DarwinLdDriver.cpp
  llvm/include/llvm/Option/OptParser.td
  llvm/include/llvm/Option/OptTable.h
  llvm/include/llvm/Option/Option.h
  llvm/lib/Option/OptTable.cpp
  llvm/lib/Option/Option.cpp
  llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
  llvm/tools/llvm-cvtres/llvm-cvtres.cpp
  llvm/unittests/Option/OptionParsingTest.cpp
  llvm/utils/TableGen/OptParserEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33383.102958.patch
Type: text/x-patch
Size: 19058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170618/679c5d81/attachment.bin>


More information about the llvm-commits mailing list