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

2017-06-02 Thread Bryce Liu via Phabricator via cfe-commits
brycel updated this revision to Diff 101224. brycel added a comment. Move namespace-level types to class-level to avoid potential future name conflicts. https://reviews.llvm.org/D33497 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/LambdaFunctionNameCheck.cpp clang-tidy/misc/Lambd

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

2017-06-02 Thread Bryce Liu via Phabricator via cfe-commits
brycel updated this revision to Diff 101223. brycel marked 4 inline comments as done. brycel added a comment. Addressed comments from alexfh. In particular, changed to using a set from a vector. https://reviews.llvm.org/D33497 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/LambdaFun

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

2017-05-24 Thread Bryce Liu via Phabricator via cfe-commits
brycel updated this revision to Diff 100161. brycel added a comment. Double backticks, not single. https://reviews.llvm.org/D33497 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/LambdaFunctionNameCheck.cpp clang-tidy/misc/LambdaFunctionNameCheck.h clang-tidy/misc/MiscTidyModule.c

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

2017-05-24 Thread Bryce Liu via Phabricator via cfe-commits
brycel marked an inline comment as done. brycel added inline comments. Comment at: docs/ReleaseNotes.rst:83 + + Finds uses of __func__ or __FUNCTION__ inside lambdas. + Eugene.Zelenko wrote: > Eugene.Zelenko wrote: > > Please highlight __func__ and __FUNCTI

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

2017-05-24 Thread Bryce Liu via Phabricator via cfe-commits
brycel updated this revision to Diff 100159. brycel marked an inline comment as done. brycel added a comment. Fixed ReleaseNotes.rst https://reviews.llvm.org/D33497 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/LambdaFunctionNameCheck.cpp clang-tidy/misc/LambdaFunctionNameCheck.h

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

2017-05-24 Thread Bryce Liu via Phabricator via cfe-commits
brycel updated this revision to Diff 100149. brycel added a comment. Herald added a subscriber: xazax.hun. Addressed the following review comments: - Added a test to make sure we don't warn on __PRETTY_FUNCTION__ - Suppressed warnings when in a macro that also uses __FILE__ and __LINE__ - Updated

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

2017-05-24 Thread Bryce Liu via Phabricator via cfe-commits
brycel added a comment. In https://reviews.llvm.org/D33497#763307, @lebedev.ri wrote: > 1. What about `__PRETTY_FUNCTION__` ? `__PRETTY_FUNCTION__` is a little more useful, it at least tells you which function the lambda is defined in: #include int main() { auto f = [] { pri

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

2017-05-24 Thread Bryce Liu via Phabricator via cfe-commits
brycel created this revision. Herald added a subscriber: mgorny. Add a clang-tidy check for using __func__/__FUNCTION__ inside lambdas. This evaluates to the string `operator()`, which is almost never useful and almost certainly not what the author intended. https://reviews.llvm.org/D33497 Fi