From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaTemplate/atomics.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 clang/test/SemaTemplate/atomics.cpp (limited to 'clang/test/SemaTemplate/atomics.cpp') diff --git a/clang/test/SemaTemplate/atomics.cpp b/clang/test/SemaTemplate/atomics.cpp new file mode 100644 index 0000000..e9fdc9d --- /dev/null +++ b/clang/test/SemaTemplate/atomics.cpp @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR8345 +template T f(T* value) { + return __sync_add_and_fetch(value, 1); +} +int g(long long* x) { return f(x); } +int g(int* x) { return f(x); } + +namespace PR11320 { + template + void g(unsigned *x) { + __sync_bool_compare_and_swap(x, 1, 4); + } + void h() { g(0); } +} -- cgit v1.2.3