diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-08-07 06:14:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-08-07 06:14:34 +0000 |
commit | b38b49140990ae123b5290a54c500013bf614b8b (patch) | |
tree | 6e8662ceb80fe5b1b5b3b58ae384d1ddbf8d23b0 /lib | |
parent | 60b70388e43d146d968a1cc0705b30cb2d7263fe (diff) |
Objective-C pointer types don't have C-linkage, even though they are
non-POD. Fixes <rdar://problem/12031870>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index a512c0364c..ffe45fad03 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -6031,7 +6031,8 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, if (R->isIncompleteType() && !R->isVoidType()) Diag(NewFD->getLocation(), diag::warn_return_value_udt_incomplete) << NewFD << R; - else if (!R.isPODType(Context) && !R->isVoidType()) + else if (!R.isPODType(Context) && !R->isVoidType() && + !R->isObjCObjectPointerType()) Diag(NewFD->getLocation(), diag::warn_return_value_udt) << NewFD << R; } } |