diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-06-09 19:08:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-06-09 19:08:19 +0000 |
commit | 798321d8eb5630cd4a8f490a4f25e32ef195fb07 (patch) | |
tree | a59f5569ef36d00388c0428426abef26aa9105b6 /lib/Sema/SemaChecking.cpp | |
parent | 5e20cdd81c44a443562a09007668ffdf76c455af (diff) |
Notes
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 23a6fc3c4cd43..c3b81b6683d24 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; |