]> granicus.if.org Git - clang/commit
Diagnose const atomics in __atomic builtins.
authorEric Fiselier <eric@efcs.ca>
Sun, 4 Oct 2015 00:11:02 +0000 (00:11 +0000)
committerEric Fiselier <eric@efcs.ca>
Sun, 4 Oct 2015 00:11:02 +0000 (00:11 +0000)
commit982137adce752908100fb622f12648d8bb5feed7
treef6b44b9fc7ce0f6c166efc489095d479b6d2bf55
parent4d9c4a9b2346f522d08b3bada0dee8308be430a1
Diagnose const atomics in __atomic builtins.

Diagnose when a pointer to const T is used as the first argument in at atomic
builtin unless that builtin is a load operation. This is already checked for
C11 atomics builtins but not for __atomic ones.

This patch was given the LGTM by rsmith when it was part
of a larger review. (See http://reviews.llvm.org/D10407)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249252 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaChecking.cpp
test/Sema/atomic-ops.c