>> Did you try running the check on the whole LLVM project, for example?
  > I tried this and got a number of (benign) warnings from the Clang AST 
library.

  Try running only your check (`clang-tidy -checks=<your check name>`). This 
way you don't get rid of compiler warnings (yet), but they shouldn't appear in 
clang-tidy if your build is clean.

  > I'm not yet sure about the rest of the project since the AST warnings were 
mostly from header files and filled my scrollback buffer (I hope clang-tidy 
gets deduplication one day).

  Deduplication is in the plans.

  >> As for the right place for this check, neither LLVM nor Google C++ coding 
style say anything about /*Param=*/ constructs
  > It may be a good idea to codify this informal rule in the LLVM coding 
standards given the existing precedent and the fact that we can now verify it. 
I'll see if I can write up a proposal.

  Would be nice.

  >> so it doesn't seem right to put it into one of those.
  > So I think I have a more fundamental question around the organization of 
clang-tidy checkers. Quite a few comments in the initial clang-tidy review 
(D884) revolved around checker organization and I think now is probably the 
right time to think about reorganizing especially if we do decide not to change 
the coding standards.
  > My strawman proposal is to reorganize the checkers with a single checker 
per .cpp file, each in a new directory "checkers" under the clang-tidy 
directory. I can start with this checker and we can probably move the other 
checkers incrementally.

  It's fine to have one checker per .cpp file, I was thinking about this as 
well. But just putting them all to one directory doesn't seem like a good idea. 
It would be nice to have some sort of a structure here. The current 
implementation with a module per file is not perfect, as there are checks that 
make sense for several styles. But we need some more information to have a 
cleaner picture. Moving checkers around doesn't seem a very complicated 
refactoring, so there's no harm in waiting until we have more checkers.

http://llvm-reviews.chandlerc.com/D2914
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to