[bash-autocompletion] Fix bug when a flag ends with '='
authorYuka Takahashi <yukatkh@gmail.com>
Wed, 24 Oct 2018 08:24:16 +0000 (08:24 +0000)
committerYuka Takahashi <yukatkh@gmail.com>
Wed, 24 Oct 2018 08:24:16 +0000 (08:24 +0000)
commitdf9c7e3001377d6da7098fdd4fc5c54293620d37
treea05d7b68a92c0a117f2e73c777bd2390992120d6
parent2a1b1d94b63cf37513fb71057f2eb9ef85d91fba
[bash-autocompletion] Fix bug when a flag ends with '='

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
clang/lib/Driver/Driver.cpp
clang/test/Driver/autocomplete.c