Home | History | Annotate | Download | only in SemaTemplate
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 // expected-no-diagnostics
      3 
      4 // PR8345
      5 template<typename T> T f(T* value) {
      6   return __sync_add_and_fetch(value, 1);
      7 }
      8 int g(long long* x) { return f(x); }
      9 int g(int* x) { return f(x); }
     10 
     11 namespace PR11320 {
     12   template<typename T>
     13   void g(unsigned *x) {
     14     __sync_bool_compare_and_swap(x, 1, 4);
     15   }
     16   void h() { g<int>(0); }
     17 }
     18