diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -4200,7 +4200,7 @@ HelpText<"Serialize compiler diagnostics to a file">; // We give --version different semantics from -version. def _version : Flag<["--"], "version">, - Flags<[CoreOption, CC1Option, FC1Option, FlangOption]>, + Flags<[CoreOption, FC1Option, FlangOption]>, HelpText<"Print version information">; def _signed_char : Flag<["--"], "signed-char">, Alias; def _std : Separate<["--"], "std">, Alias; diff --git a/clang/test/Frontend/unknown-arg.c b/clang/test/Frontend/unknown-arg.c --- a/clang/test/Frontend/unknown-arg.c +++ b/clang/test/Frontend/unknown-arg.c @@ -4,6 +4,9 @@ // RUN: FileCheck %s --check-prefix=DID-YOU-MEAN // RUN: not %clang %s -E -Xclang --hel[ 2>&1 | \ // RUN: FileCheck %s --check-prefix=DID-YOU-MEAN +// RUN: not %clang_cc1 --version 2>&1 | \ +// RUN: FileCheck %s --check-prefix=DID-YOU-MEAN-VER // CHECK: error: unknown argument: '--helium' // DID-YOU-MEAN: error: unknown argument '--hel['; did you mean '--help'? +// DID-YOU-MEAN-VER: error: unknown argument '--version'; did you mean '-version'?