[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D80961#2073049 , @klimek wrote: > Without jumping into the discussion whether it should be the default, I think > we should be able to control template instantiation visitation separately > from other implicit nodes. >

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-04 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2074915 , @steveire wrote: > Hmm, `IgnoreUnlessSpelledInSource` is designed and named to fill that role. In other words: to me this change is a bug fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-04 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2073049 , @klimek wrote: > Without jumping into the discussion whether it should be the default, I think > we should be able to control template instantiation visitation separately > from other implicit nodes. Hmm, `

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-04 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Without jumping into the discussion whether it should be the default, I think we should be able to control template instantiation visitation separately from other implicit nodes. Having to put AsIs on a matcher every time you need to match template instantiations is a ra

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-04 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D80961#2068865 , @ymandel wrote: > Thank you for bringing up this issue. I think it highlights an underlying > problem -- editing templates is quite difficult -- that neither setting will > address, as Dmitri expanded on above.

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2068902 , @aaron.ballman wrote: > My experience with clang-tidy has been that template instantiations are a > double-edged sword. The instantiation is the only place at which you have > sufficient information to perfo

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2067638 , @gribozavr2 wrote: > If IgnoreUnlessSpelledInSource is indeed for novice users (and not to be > strictly interpreted as "it does what it says") we should think about whether > it more useful to ignore instant

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D80961#2068865 , @ymandel wrote: > Thank you for bringing up this issue. I think it highlights an underlying > problem -- editing templates is quite difficult -- that neither setting will > address, as Dmitri expanded on abov

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. My experience with clang-tidy has been that template instantiations are a double-edged sword. The instantiation is the only place at which you have sufficient information to perform many kinds of analyses, but it's also often not plausible to modify the templated

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thank you for bringing up this issue. I think it highlights an underlying problem -- editing templates is quite difficult -- that neither setting will address, as Dmitri expanded on above. Given the parallel to macros, I'd say your change is better than the status quo.

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-01 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. I think it makes sense to align the documentation and the definition of IgnoreUnlessSpelledInSource, I'm just not sure which component we should change -- the documentation or the implementation. Making IgnoreUnlessSpelledInSource not match template instantiations is

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 267750. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80961/new/ https://reviews.llvm.org/D80961 Files: clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp clang-

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-01 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: sammccall, aaron.ballman, gribozavr2, ymandel, klimek. Herald added a project: clang. Herald added a subscriber: cfe-commits. steveire updated this revision to Diff 267750. steveire added a comment. Update IgnoreUnlessSpelledInSource mode