[PATCH] D32759: Fix errored return value in CheckFunctionReturnType and add a
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 2 13:58:14 PDT 2017
erichkeane created this revision.
https://reviews.llvm.org/D32759
Files:
lib/Sema/SemaType.cpp
Index: lib/Sema/SemaType.cpp
===================================================================
--- lib/Sema/SemaType.cpp
+++ lib/Sema/SemaType.cpp
@@ -2285,8 +2285,9 @@
// Methods cannot return interface types. All ObjC objects are
// passed by reference.
if (T->isObjCObjectType()) {
- Diag(Loc, diag::err_object_cannot_be_passed_returned_by_value) << 0 << T;
- return 0;
+ Diag(Loc, diag::err_object_cannot_be_passed_returned_by_value)
+ << 0 << T << FixItHint::CreateInsertion(Loc, "*");
+ return true;
}
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32759.97496.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170502/497f36a3/attachment.bin>
More information about the cfe-commits
mailing list