[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-09 Thread Yuka Takahashi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307479: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified (authored by yamaguchi). Changed prior to commit: https://reviews.llvm.org/D34770?vs=105209=105772#toc Repository: rL

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-05 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added inline comments. Comment at: clang/utils/bash-autocomplete.sh:16 + if [[ "${COMP_WORDS[1]}" == "-cc1" || "$w1" == "-Xclang" ]]; then +arg="#" + fi compnerd wrote: > `prefix` may be a better term? Thanks for reviewing! $arg has string like

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-05 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 105209. yamaguchi added a comment. Fixed typo. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/include/llvm/Option/OptTable.h llvm/lib/Option/OptTable.cpp

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-03 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd accepted this revision. compnerd added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/Driver.cpp:1236 +// We want to show cc1-only options only when clang is invoked as "clang -cc1". +// When clang is invoked as

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104983. yamaguchi added a comment. Update code comments. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/include/llvm/Option/OptTable.h

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-01 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104982. yamaguchi added a comment. Update diff. Autocomplete cc1 flags when argv[1] is -cc1 or previous flag is -Xclang. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-07-01 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. > I'm not sure what you refer to by ` I just saw we actually have the > completion code in the Driver`. We are already auto completing both cc1 > options and driver options, right? Woops, I misread the code there. Never mind! > What about completing cc1 options only

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-06-30 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi added a comment. @teemperor > I think we want to support completing both -cc1 and normal driver invocation. > Most people use the driver, but for example during debugging people use the > cc1 version, so both are valid use cases. I just saw we actually have the > completion code in

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-06-29 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. Two thought from me on this: 1. I think we want to support completing both -cc1 and normal driver invocation. Most people use the driver, but for example during debugging people use the cc1 version, so both are valid use cases. I just saw we actually have the

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-06-28 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi updated this revision to Diff 104490. yamaguchi added a comment. Update patch. https://reviews.llvm.org/D34770 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/autocomplete.c clang/utils/bash-autocomplete.sh llvm/include/llvm/Option/OptTable.h

[PATCH] D34770: [Bash-autocompletion] Auto complete cc1 options if -cc1 is specified

2017-06-28 Thread Yuka Takahashi via Phabricator via cfe-commits
yamaguchi created this revision. Herald added a subscriber: hiraditya. We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`. Another idea for this implementation is to make --autocomplete a cc1 option and handle it in clang Frontend, by porting