1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2
3namespace PR15360 {
4  template<typename R, typename U, R F>
5  U f() { return &F; } // expected-error{{cannot take the address of an rvalue of type 'int (*)(int)'}} expected-error{{cannot take the address of an rvalue of type 'int *'}}
6  void test() {
7    f<int(int), int(*)(int), nullptr>(); // expected-note{{in instantiation of}}
8    f<int[3], int*, nullptr>(); // expected-note{{in instantiation of}}
9  }
10}
11