view clang/test/SemaCXX/pr47804.cpp @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents
children
line wrap: on
line source

// RUN: %clang_cc1 -std=c++11 -fsyntax-only %s -verify

template <class InputIt, class Pred>
bool all_of(InputIt first, Pred p);

template <typename T> void load_test() {
  // Ensure that this doesn't crash during CorrectDelayedTyposInExpr,
  // or any other use of TreeTransform that doesn't implement TransformDecl
  // separately.  Also, this should only error on 'output', not that 'x' is not
  // captured.
  // expected-error@+1 {{use of undeclared identifier 'output'}}
  all_of(output, [](T x) { return x; });
}

int main() {
  load_test<int>();
  return 0;
}