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
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
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
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
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
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
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
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