summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2018-07-18 18:01:41 +0000
committerJF Bastien <jfbastien@apple.com>2018-07-18 18:01:41 +0000
commit7d60a0f118b4ad23df106c8fcf69bcb1e951c180 (patch)
treeeed35d20b9d803746995b5c27a4a12a88298a2dc /clang/lib/Sema/Sema.cpp
parenta747d3ca6011db00cb21489d1a4fa8b6cbcd2878 (diff)
downloadbcm5719-llvm-7d60a0f118b4ad23df106c8fcf69bcb1e951c180.tar.gz
bcm5719-llvm-7d60a0f118b4ad23df106c8fcf69bcb1e951c180.zip
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 llvm-svn: 337410
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 55000e3e350..f81a34c40bd 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/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;
}
}
OpenPOWER on IntegriCloud