brintos

brintos / llvm-project-archived public Read only

0
0
Text · 568 B · 3ac1de5 Raw
19 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only %s -verify2 3template <class InputIt, class Pred>4bool all_of(InputIt first, Pred p);5 6template <typename T> void load_test() {7  // Ensure that this doesn't crash during CorrectDelayedTyposInExpr,8  // or any other use of TreeTransform that doesn't implement TransformDecl9  // separately.  Also, this should only error on 'output', not that 'x' is not10  // captured.11  // expected-error@+1 {{use of undeclared identifier 'output'}}12  all_of(output, [](T x) { return x; });13}14 15int main() {16  load_test<int>();17  return 0;18}19