You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang-tools-extra/test/clang-tidy/checkers/bugprone/lambda-function-name.cpp
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,22 @@ void Positives() {
19
19
// CHECK-MESSAGES-NO-CONFIG: :[[@LINE-1]]:8: warning: inside a lambda, '__FUNCTION__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly [bugprone-lambda-function-name]
20
20
[] { EMBED_IN_ANOTHER_MACRO1; }();
21
21
// CHECK-MESSAGES-NO-CONFIG: :[[@LINE-1]]:8: warning: inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly [bugprone-lambda-function-name]
22
+
[] {
23
+
__func__;
24
+
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly [bugprone-lambda-function-name]
25
+
structS {
26
+
voidf() {
27
+
__func__;
28
+
[] {
29
+
__func__;
30
+
// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly [bugprone-lambda-function-name]
31
+
}();
32
+
__func__;
33
+
}
34
+
};
35
+
__func__;
36
+
// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: inside a lambda, '__func__' expands to the name of the function call operator; consider capturing the name of the enclosing function explicitly [bugprone-lambda-function-name]
0 commit comments