]> granicus.if.org Git - clang/commit
[Driver] Test for correct '--version' suggestion
authorBrian Gesiak <modocache@gmail.com>
Wed, 10 Jan 2018 20:23:45 +0000 (20:23 +0000)
committerBrian Gesiak <modocache@gmail.com>
Wed, 10 Jan 2018 20:23:45 +0000 (20:23 +0000)
commitf3d739418b264a3967db2f56aee3df4ed2f8d45b
treefbee6c0eee6e2aea8ba4ac3975b06421b0dfa5af
parent680b3a8619bf1564074da2165d6e0cbf79dc62ff
[Driver] Test for correct '--version' suggestion

Summary:
The `llvm::OptTable::findNearest` bug fixed in
https://reviews.llvm.org/D41873 manifested itself as the following
erroneous message when invoking Clang:

```
clang -version
clang-6.0: error: unknown argument '-version', did you mean 'version'?
```

Add a test to catch any future regressions to the now correct behavior,
which asks "did you mean '--version'?".

Test Plan: `check-clang`

Reviewers: v.g.vassilev, teemperor, ruiu, jroelofs, yamaguchi

Reviewed By: v.g.vassilev

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D41912

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322220 91177308-0d34-0410-b5e6-96231b3b80d8
test/Driver/unknown-arg.c