summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-31 19:28:59 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-31 19:28:59 +0000
commit9e435806aaf5bd7e974d317ef247f200200ad686 (patch)
tree950414edc74ebec2c62ac1b5fd10e799f0204b5b /lib/Sema/SemaChecking.cpp
parent06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (diff)
Notes
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 9fc2bec23b1b..fdc136ccbd23 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -1340,6 +1340,11 @@ ExprResult Sema::SemaAtomicOpsOverloaded(ExprResult TheCallResult,
<< IsC11 << Ptr->getType() << Ptr->getSourceRange();
return ExprError();
}
+ if (IsC11 && ValType->isPointerType() &&
+ RequireCompleteType(Ptr->getLocStart(), ValType->getPointeeType(),
+ diag::err_incomplete_type)) {
+ return ExprError();
+ }
} else if (IsN && !ValType->isIntegerType() && !ValType->isPointerType()) {
// For __atomic_*_n operations, the value type must be a scalar integral or
// pointer type which is 1, 2, 4, 8 or 16 bytes in length.