summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/autocomplete.c
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Rename lang mode flag for C++ modeAnastasia Stulova2019-07-251-2/+4
| | | | | | | | | | | | Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++ or -std=clc++/-std=CLC++. This aligns with OpenCL C conversion and removes ambiguity with OpenCL C++. Differential Revision: https://reviews.llvm.org/D65102 llvm-svn: 367008
* Initial support for vectorization using MASSV (IBM MASS vector library)Nemanja Ivanovic2019-06-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Part 2 (the Clang portion) of D59881. This patch (first of two patches) enables the vectorizer to recognize the IBM MASS vector library routines. This patch specifically adds support for recognizing the -vector-library=MASSV option, and defines mappings from IEEE standard scalar math functions to generic PowerPC MASS vector counterparts. For instance, the generic PowerPC MASS vector entry for double-precision cbrt function is __cbrtd2_massv. The second patch will further lower the generic PowerPC vector entries to PowerPC subtarget-specific entries. For instance, the PowerPC generic entry cbrtd2_massv is lowered to cbrtd2_P9 for Power9 subtarget. The overall support for MASS vector library is presented as such in two patches for ease of review. Patch by Jeeva Paudel. Differential revision: https://reviews.llvm.org/D59881 llvm-svn: 362571
* [autocompletion] Handle the space before pressing tabYuka Takahashi2018-10-241-0/+6
| | | | | | | | | | | Summary: Distinguish "--autocomplete=-someflag" and "--autocomplete=-someflag," because the latter indicates that the user put a space before pushing tab which should end up in a file completion. Differential Revision: https://reviews.llvm.org/D53639 llvm-svn: 345133
* [bash-autocompletion] Fix bug when a flag ends with '='Yuka Takahashi2018-10-241-0/+6
| | | | | | | | | | | | | | | | | | There was a bug that when a flag ends with '=' and no value was suggested, clang autocompletes the flag itself. For example, in bash, it looked like this: ``` $ clang -fmodule-file=[tab] -> $clang -fmodule-file=-fmodule-file ``` This is not what we expect. We expect a file autocompletion when no value was found. With this patch, pressing tab suggests files in the current directory. Reviewers: teemperor, ruiu Subscribers: cfe-commits llvm-svn: 345121
* [OpenCL] Added -std/-cl-std=c++Anastasia Stulova2018-04-121-1/+2
| | | | | | | | This is std option for OpenCL C++ v1.0. Differential Revision: https://reviews.llvm.org/D45363 llvm-svn: 329911
* [Bash-autocompletion] Pass all flags in shell command-line to ClangYuka Takahashi2018-03-051-25/+29
| | | | | | | | | | | | | | | | | | | | Previously, we passed "#" to --autocomplete to indicate to enable cc1 flags. For example, when -cc1 or -Xclang was passed to bash, bash executed `clang --autocomplete=#-<flag they want to complete>`. However, this was not a good implementation because it depends -Xclang and -cc1 parsing to shell. So I changed this to pass all flags shell has, so that Clang can handle them internally. I had to change many testcases because API spec changed quite a lot. Reviewers: teemperor, v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39342 llvm-svn: 326684
* [Bash-autocomplete] Fix crash when invoking --autocomplete without value.Raphael Isemann2017-09-051-0/+13
| | | | | | | | | | | | | | | | Summary: Currently clang segfaults when invoked with `clang --autocomplete=`. This patch adds the necessary boundary checks and some tests for corner cases like this. Reviewers: yamaguchi Reviewed By: yamaguchi Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37465 llvm-svn: 312533
* [Bash-autocompletion] Add support for -std=Yuka Takahashi2017-08-291-0/+2
| | | | | | | | | | | | | | | Summary: Add support for autocompleting values of -std= by including LangStandards.def. This patch relies on D36782, and is using two-stage code generation. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36820 llvm-svn: 311971
* Revert "Revert r311552: [Bash-autocompletion] Add support for static ↵Yuka Takahashi2017-08-291-0/+2
| | | | | | | | | | | analyzer flags" This reverts commit 7c46b80c022e18d43c1fdafb117b0c409c5a6d1e. r311552 broke lld buildbot because I've changed OptionInfos type from ArrayRef to vector. However the bug is fixed, so I'll commit this again. llvm-svn: 311958
* Revert r311552: [Bash-autocompletion] Add support for static analyzer flagsRui Ueyama2017-08-231-2/+0
| | | | | | This reverts commit r311552 because it broke ubsan and asan bots. llvm-svn: 311557
* [Bash-autocompletion] Add support for static analyzer flagsYuka Takahashi2017-08-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This is a patch for clang autocomplete feature. It will collect values which -analyzer-checker takes, which is defined in clang/StaticAnalyzer/Checkers/Checkers.inc, dynamically. First, from ValuesCode class in Options.td, TableGen will generate C++ code in Options.inc. Options.inc will be included in DriverOptions.cpp, and calls OptTable's addValues function. addValues function will add second argument to Option's Values class. Values contains string like "foo,bar,.." which is handed to Values class in OptTable. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: hiraditya, cfe-commits Differential Revision: https://reviews.llvm.org/D36782 llvm-svn: 311552
* [Bash-autocompletion] Add comment to test so that it is easier to fixYuka Takahashi2017-08-021-0/+4
| | | | | | | | | | | | | | | | Summary: clang/test/Driver/autocomplete.c is a test for --autocomplete, and this test might break if people add/modify flags or HelpText. So I've add comment for future developers so that they can fix this file according to the change they had made. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36209 llvm-svn: 309794
* [Bash-autocompletion] Show HelpText with possible flagsYuka Takahashi2017-07-261-16/+61
| | | | | | | | | | | | | | | | | | | | | | Summary: `clang --autocomplete=-std` will show ``` -std: Language standard to compile for -std= Language standard to compile for -stdlib= C++ standard library to use ``` after this change. However, showing HelpText with completion in bash seems super tricky, so this feature will be used in other shells (fish, zsh...). Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35759 llvm-svn: 309113
* [Bash-autocompletion] Fixed typo and add '-' after -WnoYuka Takahashi2017-07-221-2/+2
| | | | | | | | Summary: -Wno-<warning> was autocompleted as -Wno<warning>, so fixed this typo. Differential Revision: https://reviews.llvm.org/D35762 llvm-svn: 308824
* [Bash-autocompletion] Add support for -W<warning> and -Wno<warning>Yuka Takahashi2017-07-161-0/+4
| | | | | | | | | | Summary: `-W[tab]` will autocomplete warnings defined in this link: https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables Differential Revision: https://reviews.llvm.org/D35447 llvm-svn: 308139
* [Bash-autocompletion] Auto complete cc1 options if -cc1 is specifiedYuka Takahashi2017-07-081-0/+4
| | | | | | | | | | | | | | Summary: 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 --autocomplete handler from Driver to Frontend, so that we can handle Driver options and CC1 options in unified manner. Differential Revision: https://reviews.llvm.org/D34770 llvm-svn: 307479
* [GSoC] Add support for CC1 options.Yuka Takahashi2017-06-231-0/+2
| | | | | | | | | | | | | | Summary: Add value completion support for options which are defined in CC1Options.td, because we only handled options in Options.td. Reviewers: ruiu, v.g.vassilev, teemperor Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34558 llvm-svn: 306127
* Sort the autocomplete candidates before printing them out.Rui Ueyama2017-06-231-8/+8
| | | | | | | | | | Currently, autocompleted options are displayed in the same order as we wrote them in .td files. This patch sort them out in clang so that they are sorted alphabetically. This should improve usability. Differential Revision: https://reviews.llvm.org/D34557 llvm-svn: 306116
* Use -NOT prefix instead of adding `not` to FileCheck.Rui Ueyama2017-06-211-2/+2
| | | | | | | | | | If we want to make sure that a particular string is not in an output, the regular way of doing it is to add `-NOT` prefix instead of checking if FileCheck resulted in an error. Differential Revision: https://reviews.llvm.org/D34435 llvm-svn: 305930
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-201-0/+30
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* [GSoC] Shell autocompletion for clangYuka Takahashi2017-05-231-0/+6
Summary: This is a first patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. Simple flag completion and path completion is available in this patch. Reviewers: teemperor, v.g.vassilev, ruiu, Bigcheese, efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33237 llvm-svn: 303670
OpenPOWER on IntegriCloud