Home | History | Annotate | Download | only in PCH
      1 // RUN: %clang_cc1 -std=c++11 -x c++-header %s -emit-pch -o %t.pch
      2 // RUN: %clang_cc1 -std=c++11 -x c++ /dev/null -include-pch %t.pch
      3 class move_only { move_only(const move_only&) = delete; move_only(move_only&&); };
      4 struct sb {
      5   move_only il;
      6   sb();
      7   sb(sb &&);
      8 };
      9 
     10 template<typename T> T make();
     11 template<typename T> void doit(decltype(T(make<const T&>()))*) { T(make<const T&>()); }
     12 template<typename T> void doit(...) { T(make<T&&>()); }
     13 template<typename T> void later() { doit<T>(0); }
     14 
     15 void fn1() {
     16   sb x;
     17   later<sb>();
     18 }
     19