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