ChuanqiXu9 wrote:

> If modules are considered as system headers in clang-tidy, there was work in 
> #128150 to reduce scope of traversal to match only in user code (I suppose it 
> would affect modules too). But that PR had to be reverted due to appeared 
> issues with downstream users. Hopefully it will reland in the future. 
> @carlosgalvezp may shine some light on this matter.

I think modules are not system headers. For the example in the issue, the 
module interface is not system nor headers. It is  another TU but we just can 
get AST from it. I think it may be a valid expectation to not check the same TU 
again and again for different consumers.

> 
> Treating modules separately doesn't seem right to me. Also, If we exclude 
> only `decls` what happens with `stmts` and other nodes, are they still 
> getting matched and filtered? What happens if a check looks for a `decl` 
> inside system header and later compare it to `decl` inside user-code?

For "stmts" and other "nodes", my expectation is to exclude them as well. I 
just want to avoid duplications.

https://github.com/llvm/llvm-project/pull/145630
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to