diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp b/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp index 93217b0f57a..80180eeaba2 100644 --- a/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp +++ b/clang-tools-extra/test/clang-tidy/misc-argument-comment.cpp @@ -12,6 +12,7 @@ void g() { // CHECK-MESSAGES: [[@LINE+2]]:14: warning: argument name 'z' in comment does not match parameter name 'y' // CHECK-MESSAGES: :[[@LINE-5]]:19: note: 'y' declared here f(/*y=*/0, /*z=*/0); + // CHECK-FIXES: {{^}} f(/*y=*/0, /*z=*/0); } struct Closure {}; @@ -37,4 +38,11 @@ void templates() { variadic(/*xxx=*/0, /*yyy=*/1); variadic2(/*zzZ=*/0, /*xxx=*/1, /*yyy=*/2); // CHECK-MESSAGES: [[@LINE-1]]:13: warning: argument name 'zzZ' in comment does not match parameter name 'zzz' + // CHECK-FIXES: variadic2(/*zzz=*/0, /*xxx=*/1, /*yyy=*/2); } + +#define FALSE 0 +void qqq(bool aaa); +void f() { qqq(/*bbb=*/FALSE); } +// CHECK-MESSAGES: [[@LINE-1]]:16: warning: argument name 'bbb' in comment does not match parameter name 'aaa' +// CHECK-FIXES: void f() { qqq(/*bbb=*/FALSE); } |