summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-06-16 22:34:44 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-06-16 22:34:44 +0000
commitd9bc6c3f593459b62da87ff63d9ce096d4a26031 (patch)
tree1072fc89163bfc958fc297ba3a99248ee311f297 /clang/lib/Sema/SemaExprObjC.cpp
parent3b95df8d082c27fb627e0a2cdfcdaed0ad445597 (diff)
downloadbcm5719-llvm-d9bc6c3f593459b62da87ff63d9ce096d4a26031.tar.gz
bcm5719-llvm-d9bc6c3f593459b62da87ff63d9ce096d4a26031.zip
For the purpose of @encode'ing, accept 'void' type
(even though it is incomplete type) because gcc says so. // rdar://9622422 llvm-svn: 133208
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index 1d1f6aeb348..70eb2a3c727 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -128,7 +128,8 @@ ExprResult Sema::BuildObjCEncodeExpression(SourceLocation AtLoc,
if (EncodedType->isDependentType())
StrTy = Context.DependentTy;
else {
- if (!EncodedType->getAsArrayTypeUnsafe()) // Incomplete array is handled.
+ if (!EncodedType->getAsArrayTypeUnsafe() && //// Incomplete array is handled.
+ !EncodedType->isVoidType()) // void is handled too.
if (RequireCompleteType(AtLoc, EncodedType,
PDiag(diag::err_incomplete_type_objc_at_encode)
<< EncodedTypeInfo->getTypeLoc().getSourceRange()))
OpenPOWER on IntegriCloud