[PATCH] D116503: [clang] Add --start-no-unused-arguments/--end-no-unused-arguments to silence some unused argument warnings

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 5 11:37:14 PST 2022


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

I forwarded this to some groups who want this functionality. Jannik2099 from Gentoo likes the change.

But make sure to wait a bit to see what others think.



================
Comment at: clang/test/Driver/diagnostics.c:21
+// RUN:   -fsyntax-only -lfoo -Werror %s 2>&1 | FileCheck %s
 
+// With a specific -Wno-..., no diagnostic should be printed.
----------------
mstorsjo wrote:
> MaskRay wrote:
> > Looks like no command has an output. In case there is one, make sure `-o /dev/null`
> As all commands use `-fsyntax-only`, I presume there should be no output. So do I read your comment correctly that we should have `-o /dev/null` specifically _if_ we'd have a test that lack `-fsyntax-only`, or do you want me to add it just in case? (The preexisting test doesn't have that and just use `-fsyntax-only`.)
-fsyntax-only doesn't need `-o /dev/null`.

Some downstream users (including Google) may run the test in the source directory and make the source directory in a read-only filesystem, so printing files other than somewhere in `%t*` will lead to an error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116503



More information about the cfe-commits mailing list