brintos

brintos / llvm-project-archived public Read only

0
0
Text · 814 B · c0ce374 Raw
19 lines · cpp
1// RUN: %check_clang_tidy -std=c++14 %s boost-use-ranges %t -check-suffixes=,PIPE \2// RUN:   -config="{CheckOptions: { \3// RUN:     boost-use-ranges.UseReversePipe: true }}" -- -I %S/Inputs/use-ranges/4// RUN: %check_clang_tidy -std=c++14 %s boost-use-ranges %t -check-suffixes=,NOPIPE  -- -I %S/Inputs/use-ranges/5 6// CHECK-FIXES: #include <boost/algorithm/cxx11/is_sorted.hpp>7// CHECK-FIXES: #include <boost/range/adaptor/reversed.hpp>8 9#include "fake_std.h"10 11void stdLib() {12  std::vector<int> I;13  std::is_sorted_until(I.rbegin(), I.rend());14  // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use a boost version of this algorithm15  // CHECK-FIXES-NOPIPE: boost::algorithm::is_sorted_until(boost::adaptors::reverse(I));16  // CHECK-FIXES-PIPE: boost::algorithm::is_sorted_until(I | boost::adaptors::reversed);17 18}19