// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template struct pair {}; template struct map { typedef pair *iterator; iterator begin(); iterator end(); }; template pair &tie(T &, U &); int foo(map &m) { char *p; int n; for (pair x : m) { (void)x; } for (tie(p, n) : m) { // expected-error {{for range declaration must declare a variable}} (void)p; (void)n; } return n; }