// 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(); } namespace Auto { template struct A { }; // expected-error {{until C++17}} } namespace check_conversion_early { struct X {}; template struct A {}; template struct A {}; // expected-error {{not implicitly convertible}} struct Y { constexpr operator int() const { return 0; } }; template struct A {}; // expected-error {{cannot be deduced}} expected-note {{'y'}} }