[Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 23 Sep 2022 16:39:25 +0000 (11:39 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Sat, 24 Sep 2022 12:58:40 +0000 (07:58 -0500)
commite2213159fa654a9ba8b211204a7342f6bc1690c6
tree06746b2b0b0de8ca3978cb65a83fd05346f88f93
parent75279aeecd1d75ece58b850e1224f85332a0fb66
[Clang] Make Clang driver suggest '-Xclang' for CC1 options passed to the driver

This patch adds an additional check for if an options passed to the
Clang driver could've been intended for the clang compiler. This is
primarily done for the times when a user attempts to pass an option like
`-ast-dump` to the driver instead.

Reviewed By: MaskRay, aaron.ballman

Differential Revision: https://reviews.llvm.org/D134550
clang/lib/Driver/Driver.cpp
clang/test/Driver/debug-options.c
clang/test/Driver/unknown-arg.c
clang/test/Misc/driver-verify.c