[clang-tidy] [Modules] Skip checking decls in clang-tidy (#145630) (#190733)

Close https://github.com/llvm/llvm-project/issues/145628

Note that I am not sure if this is the proper fix. On the one hand, the
fix lives in ASTMachers instead of clang-tidy. On the other hand, I feel
this may be a more general fix.

GitOrigin-RevId: 8460cb9bbb39372815ded429cd56f31a87bba9dc
3 files changed