// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s namespace PR15360 { template 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 *'}} void test() { f(); // expected-note{{in instantiation of}} f(); // expected-note{{in instantiation of}} } } namespace CanonicalNullptr { template struct get { typedef T type; }; struct X {}; template::type P = nullptr> struct A {}; template::type P = nullptr> struct B {}; template::type P = nullptr> struct C {}; template A MakeA(); template B MakeB(); template C MakeC(); A a = MakeA(); B b = MakeB(); C c = MakeC(); }