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
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
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
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
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
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
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
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
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
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
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
11 matches
Mail list logo