[cfe-dev] How to verify clang-tidy checks applied to headers?

Richard via cfe-dev cfe-dev at lists.llvm.org
Fri Dec 28 13:29:46 PST 2018


[Please reply *only* to the list and do not include my email directly
in the To: or Cc: of your reply; otherwise I will not see your reply.

In other words, use 'Reply' not 'Reply All'.

Thanks.]

In article <bdfd9306-7233-6712-ad2c-85cfe61c47ab at jonas-toth.eu>,
    Jonas Toth via cfe-dev <cfe-dev at lists.llvm.org> writes:

> did you try something similar to `// RUN: clang-tidy -checks='-*,
> abseil-no-namespace' -header-filter='.*' %s -- -I %S/Inputs 2>&1 |
> FileCheck %s`?

Yeah, I tried something like that, but I didn't get it to work
properly.  I will look at it again to see if I can get the right
command-line.  It's been a couple years since I worked on clang-tidy
and some of my clang-fu has decayed away.  If I can find a pattern that
works, I'll enhance the helper script to support this directly.

> This pattern occurs multiple times in the test-framework: `git grep "|
> FileCheck" *.cpp` shows quite a view places, maybe there are other
> places that are more specific to your requirement?

Thanks for the pointer.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
            The Terminals Wiki <http://terminals-wiki.org>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>


More information about the cfe-dev mailing list