diff options
author | JF Bastien <jfbastien@apple.com> | 2018-07-18 18:01:41 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2018-07-18 18:01:41 +0000 |
commit | 43cba1e10e20f01a4a185649d6298b532ad46fa8 (patch) | |
tree | cd603be1f5e627b69024b1bd91ecb9decfaa40b0 /lib/Sema/Sema.cpp | |
parent | 70cf0f619eaa16e62b228a20caee34af9be89ce8 (diff) | |
download | clang-43cba1e10e20f01a4a185649d6298b532ad46fa8.tar.gz |
Support implicit _Atomic struct load / store
Summary:
Using _Atomic to do implicit load / store is just a seq_cst atomic_load / atomic_store. Stores currently assert in Sema::ImpCastExprToType with 'can't implicitly cast lvalue to rvalue with this cast kind', but that's erroneous. The codegen is fine as the test shows.
While investigating I found that Richard had found the problem here: https://reviews.llvm.org/D46112#1113557
<rdar://problem/40347123>
Reviewers: dexonsmith
Subscribers: cfe-commits, efriedma, rsmith, aaron.ballman
Differential Revision: https://reviews.llvm.org/D49458
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 55000e3e35..f81a34c40b 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -481,6 +481,7 @@ ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty, case CK_ArrayToPointerDecay: case CK_FunctionToPointerDecay: case CK_ToVoid: + case CK_NonAtomicToAtomic: break; } } |