aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-07-21 17:38:14 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-07-21 17:38:14 +0000
commitfeb4fa165c5e8c40ffc8b1b655cc3c8071862b20 (patch)
tree4893707fc2ebbc2ae22e5ed4180b09f5b96f3c8b /lib/Sema/SemaDeclObjC.cpp
parentaab24a616de59c543d78d7636f22fb786053fefa (diff)
Add FixIt hint for missing 'id' type.
// rdar://9615045 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 261d8efeb9..43f9c78592 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -2300,7 +2300,8 @@ Decl *Sema::ActOnMethodDeclaration(
}
} else { // get the type for "id".
resultDeclType = Context.getObjCIdType();
- Diag(MethodLoc, diag::warn_missing_method_return_type);
+ Diag(MethodLoc, diag::warn_missing_method_return_type)
+ << FixItHint::CreateInsertion(SelectorStartLoc, "(id)");
}
ObjCMethodDecl* ObjCMethod =