From 798321d8eb5630cd4a8f490a4f25e32ef195fb07 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 9 Jun 2015 19:08:19 +0000 Subject: Vendor import of clang trunk r239412: https://llvm.org/svn/llvm-project/cfe/trunk@239412 --- lib/Sema/SemaChecking.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Sema/SemaChecking.cpp') diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 23a6fc3c4cd4..c3b81b6683d2 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -1604,6 +1604,10 @@ ExprResult Sema::SemaAtomicOpsOverloaded(ExprResult TheCallResult, return ExprError(); } + // atomic_fetch_or takes a pointer to a volatile 'A'. We shouldn't let the + // volatile-ness of the pointee-type inject itself into the result or the + // other operands. + ValType.removeLocalVolatile(); QualType ResultType = ValType; if (Form == Copy || Form == GNUXchg || Form == Init) ResultType = Context.VoidTy; -- cgit v1.3