Fix deduction of __atomic_load's parameter types.
authorEric Fiselier <eric@efcs.ca>
Wed, 30 Mar 2016 23:39:56 +0000 (23:39 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 30 Mar 2016 23:39:56 +0000 (23:39 +0000)
commit8d662441a6a50530d7779e815df14c0426deb8e3
tree7792e1c3792a38ae86bc2b93291e5662a3b63049
parent6596977130f9fb5179b16d3c3c291c69efd627bb
Fix deduction of __atomic_load's parameter types.

Summary:
__atomic_load's allows it's first argument to be a pointer to a const type. However the second argument is an output parameter and must be a pointer to non-const.
This patch fixes the signature of __atomic_load generated by clang so that it respects the above requirements.

Reviewers: rsmith, majnemer

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D13420

llvm-svn: 264967
clang/lib/Sema/SemaChecking.cpp
clang/test/Sema/atomic-ops.c