summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-07-31 13:34:58 +0000
committerAlexander Kornienko <alexfh@google.com>2015-07-31 13:34:58 +0000
commitb4fbb173f0892105806e93520486c81225dc029d (patch)
treedbb4db48d1a7464693e438f6ec2321edb8f85db7 /clang-tools-extra/test/clang-tidy
parenta2ce083d2daac54f3c026a2e0e04fc53338c47c6 (diff)
downloadbcm5719-llvm-b4fbb173f0892105806e93520486c81225dc029d.tar.gz
bcm5719-llvm-b4fbb173f0892105806e93520486c81225dc029d.zip
[clang-tidy] Support replacements in macro arguments in misc-inefficient-algorithm
Summary: Support replacements in macro arguments in the misc-inefficient-algorithm check. Reviewers: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11677 llvm-svn: 243747
Diffstat (limited to 'clang-tools-extra/test/clang-tidy')
-rw-r--r--clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp b/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp
index ea668c2bedd..754e4007a4e 100644
--- a/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp
+++ b/clang-tools-extra/test/clang-tidy/misc-inefficient-algorithm.cpp
@@ -76,6 +76,12 @@ int main() {
auto c = count(s.begin(), s.end(), 43);
// CHECK-MESSAGES: :[[@LINE-1]]:12: warning: this STL algorithm call should be
// CHECK-FIXES: {{^ }}auto c = s.count(43);{{$}}
+
+#define SECOND(x, y, z) y
+ SECOND(q,std::count(s.begin(), s.end(), 22),w);
+ // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: this STL algorithm call should be
+ // CHECK-FIXES: {{^ }}SECOND(q,s.count(22),w);{{$}}
+
it = find_if(s.begin(), s.end(), [](int) { return false; });
std::multiset<int> ms;
OpenPOWER on IntegriCloud