[PATCH] D99901: [Driver][test] Test intended target only
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 28 08:25:39 PDT 2021
hubert.reinterpretcast added inline comments.
================
Comment at: clang/test/Driver/nostdincxx.cpp:4
// RUN: not %clangxx -nostdlibinc %s 2>&1 | FileCheck %s
-// RUN: not %clangxx -fsyntax-only -nostdinc -nostdinc++ %s 2>&1 | FileCheck /dev/null --implicit-check-not=-Wunused-command-line-argument
+// RUN: not %clangxx -target unknown-unknown-gnu -fsyntax-only -nostdinc -nostdinc++ %s 2>&1 | FileCheck /dev/null --implicit-check-not=-Wunused-command-line-argument
// CHECK: file not found
----------------
jsji wrote:
> MaskRay wrote:
> > `error: unknown target triple 'unknown-unknown-hurd-gnu', please use -triple or -arch`
> >
> > Perhaps this should UNSUPPORTED aix if aix does not support -nostdinc++.
> No, AIX does support `-nostdinc++`, we don't want to unsupport this whole test
I believe the original fix was meant to be generally applicable but unintentionally applied in only a limited fashion. Ideally, the test would have been left as-is and the various toolchains changed similarly.
That is:
```
$ clang -nostdinc -nostdinc++ -xc++ /dev/null -fsyntax-only
clang-13: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
```
should not happen. I guess a way forward is to first make the change for AIX (and update the test to check on AIX) and then to commit a separate NFCI commit to apply the test broadly to see if anyone finds the test to be failing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99901/new/
https://reviews.llvm.org/D99901
More information about the cfe-commits
mailing list