1.. title:: clang-tidy - bugprone-lambda-function-name 2 3bugprone-lambda-function-name 4============================= 5 6Checks for attempts to get the name of a function from within a lambda 7expression. The name of a lambda is always something like ``operator()``, which 8is almost never what was intended. 9 10Example: 11 12.. code-block:: c++ 13 14 void FancyFunction() { 15 [] { printf("Called from %s\n", __func__); }(); 16 [] { printf("Now called from %s\n", __FUNCTION__); }(); 17 } 18 19Output:: 20 21 Called from operator() 22 Now called from operator() 23 24Likely intended output:: 25 26 Called from FancyFunction 27 Now called from FancyFunction 28