[PATCH] D135389: [Clang] Emit a warning for ambiguous joined '-o' arguments

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 14:55:26 PDT 2022


MaskRay accepted this revision.
MaskRay added inline comments.


================
Comment at: clang/test/Driver/unknown-arg.c:74
+
+// RUN: %clang -### --offload-arch=sm_70 -o ffload-device-only -Werror=unknown-argument %s
----------------
jhuber6 wrote:
> tra wrote:
> > jhuber6 wrote:
> > > tra wrote:
> > > > Has this patch been updated with incomplete changes? This RUN line seems to miss `2>&1 | FileCheck` and the check lines.
> > > I'm relying on the fact that `-Werror` will cause clang to return a non-zero error code and make the test fail if any warnings show up.
> > Got it. I've missed that.
> You were somewhat right, I had `-###` which apparently makes clang return 0 even on an error. So thanks for making me double check.
Use `-###` `--implicit-check-not=warning:` instead of `-emit-llvm` which runs more than the driver.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135389/new/

https://reviews.llvm.org/D135389



More information about the cfe-commits mailing list