summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/arg-comments.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-10-26 02:58:07 +0000
committerAlexander Kornienko <alexfh@google.com>2014-10-26 02:58:07 +0000
commit106c8e0898688fbdff96b017828da9762f1d6b20 (patch)
treefffad8ed33e1c3b61cc356c645434bbfe2465afd /clang-tools-extra/test/clang-tidy/arg-comments.cpp
parent6775ce3ad3e9bf3e2598143b7cac4b5ecdaafa93 (diff)
downloadbcm5719-llvm-106c8e0898688fbdff96b017828da9762f1d6b20.tar.gz
bcm5719-llvm-106c8e0898688fbdff96b017828da9762f1d6b20.zip
[clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh
Summary: Make the script suitable for checking just messages. Move most of the tests to use it. Clean up the tests: shorten messages, insert line numbers, remove unnecessary RUN: lines, etc. Reviewers: klimek Reviewed By: klimek Subscribers: curdeius, cfe-commits Differential Revision: http://reviews.llvm.org/D5989 llvm-svn: 220634
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/arg-comments.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/arg-comments.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang-tools-extra/test/clang-tidy/arg-comments.cpp b/clang-tools-extra/test/clang-tidy/arg-comments.cpp
index 922c26627cb..02dc83bb635 100644
--- a/clang-tools-extra/test/clang-tidy/arg-comments.cpp
+++ b/clang-tools-extra/test/clang-tidy/arg-comments.cpp
@@ -1,4 +1,5 @@
-// RUN: clang-tidy --checks='-*,misc-argument-comment' %s -- -std=c++11 | FileCheck %s -implicit-check-not='{{warning:|error:}}'
+// RUN: $(dirname %s)/check_clang_tidy.sh %s misc-argument-comment %t
+// REQUIRES: shell
// FIXME: clang-tidy should provide a -verify mode to make writing these checks
// easier and more accurate.
@@ -7,10 +8,10 @@ void ffff(int xxxx, int yyyy);
void f(int x, int y);
void g() {
- // CHECK: [[@LINE+4]]:5: warning: argument name 'y' in comment does not match parameter name 'x'
- // CHECK: :[[@LINE-3]]:12: note: 'x' declared here
- // CHECK: [[@LINE+2]]:14: warning: argument name 'z' in comment does not match parameter name 'y'
- // CHECK: :[[@LINE-5]]:19: note: 'y' declared here
+ // CHECK-MESSAGES: [[@LINE+4]]:5: warning: argument name 'y' in comment does not match parameter name 'x'
+ // CHECK-MESSAGES: :[[@LINE-3]]:12: note: 'x' declared here
+ // 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);
}
@@ -36,5 +37,5 @@ void variadic2(int zzz, Args&&... args);
void templates() {
variadic(/*xxx=*/0, /*yyy=*/1);
variadic2(/*zzZ=*/0, /*xxx=*/1, /*yyy=*/2);
- // CHECK: [[@LINE-1]]:13: warning: argument name 'zzZ' in comment does not match parameter name 'zzz'
+ // CHECK-MESSAGES: [[@LINE-1]]:13: warning: argument name 'zzZ' in comment does not match parameter name 'zzz'
}
OpenPOWER on IntegriCloud