// RUN: %clang_cc1 -std=c++2b -fsyntax-only -verify=expected,cxx2b %s
// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=expected,cxx14_20 %s
// RUN: %clang_cc1 -std=c++14 -fsyntax-only -verify=expected,cxx14_20 %s
int a;
int &b = -> ;
int &c = -> ;
int &d = -> auto & ;
int &e = -> auto ; // expected-error {{cannot bind to a temporary}}
int &f = -> ; // expected-error {{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'int'}}
int &g = -> ; // expected-warning {{reference to stack}}
// cxx2b-error@-1 {{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'int'}}
int
int
int
int
int