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