[PATCH] D16786: [Clang-tidy] Make modernize-redundant-void-arg working with included files

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 2 12:34:05 PST 2016


aaron.ballman added a comment.

In http://reviews.llvm.org/D16786#342075, @Eugene.Zelenko wrote:

> In http://reviews.llvm.org/D16786#342074, @aaron.ballman wrote:
>
> > In http://reviews.llvm.org/D16786#342072, @Eugene.Zelenko wrote:
> >
> > > I think proper solution will be to create tests for included files ot the fly, bu renaming main test to .h and creating dummy source file. But this is task for scripts wizards :-)
> >
> >
> > I'm not certain if that's the proper solution or not, but I'm also not comfortable with committing nontrivial changes without an accompanying test case. either. I would recommend writing a simple test include that would fail before applying your patch (and succeeds after) and go that route, unless you want to try your hand at the scripting approach.
>
>
> My point is that all checks should be test in similar situations. It's not reasonable to introduce special checks only for selected ones.


Agreed; however, not all checks have the same behavior regarding macro expansion and header files. Some checks have special behaviors regarding macros, others may require the check to not be run outside of the main file, etc. I'm not certain how well such a test harness can be generalized for this, but if you have ideas in mind, they would be great to explore!


Repository:
  rL LLVM

http://reviews.llvm.org/D16786





More information about the cfe-commits mailing list