ilya-biryukov added a comment.

In https://reviews.llvm.org/D46751#1095894, @malaperle wrote:

> Can there be an option for this? This seems very library specific and could 
> break other code bases. Ideally, there would be a generic mechanism for this 
> kind of filtering, i.e. specify a pattern of excluded files or symbol names. 
> But I understand this would be cumbersome because you want to filter only 
> *some* symbol names in *some* files, so it would be difficult for users to 
> specify this intersection of conditions on command-line arguments, for 
> example. I think this needs to be discussed a bit more or have this turned 
> off by default (with an option to turn on!) until there is a more general 
> solution for this kind of filtering.


Having user-configurable filtering may certainly be useful, but requires some 
design to get right.
And even if we have it, I think there's value in automatically handling popular 
frameworks, unless we know it might break other code **in practice**.

E.g., for protobuf, we know that generated headers always end with `.proto.h`. 
We could also check for comments that proto compiler tends to put into the 
generated files to be sure. If we do that, I feel it's better to have the 
filtering for protos **enabled** by default, since there's almost zero chance 
that people had a file that ends with `.proto.h` and put a proto compiler 
comment into it.
But even the `.proto.h` ending seems like a good enough indication.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46751



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to