[PATCH] D33497: clang-tidy check for __func__/__FUNCTION__ in lambdas

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 24 08:56:39 PDT 2017


lebedev.ri added a comment.

In https://reviews.llvm.org/D33497#763376, @brycel wrote:

> In https://reviews.llvm.org/D33497#763307, @lebedev.ri wrote:
>
> > 1. What about `__PRETTY_FUNCTION__` ?
>
>
> I think `__PRETTY_FUNCTION__` inside a lambda is useful enough not to warn about.


Then that should be checked by the test

>> 2. Consider following generic error handling macro: (ThrowException is some template function)
> 
> That's a good point. I'll look into suppressing the warning if we're in a macro definition where `__FILE__` and `__LINE__` are both used. It may suppress some warnings that would be legitimate (such as if `__FILE__`/`__LINE__` are written but not actually output anywhere), but in those cases it's probably impossible to figure out the author's intention.

Makes sense


https://reviews.llvm.org/D33497





More information about the cfe-commits mailing list