diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-21 17:00:47 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-21 17:00:47 +0000 |
commit | aab24a616de59c543d78d7636f22fb786053fefa (patch) | |
tree | 11caaf20a3c5b30f2f6276a8f1d9ce486985ddfb /lib/Sema/SemaDeclObjC.cpp | |
parent | 1a23f12e1e283384b76e768a83f01bfcbbd61ca0 (diff) |
objc - Diagnose missing method return type specifier under
a warning flag. // rdar://9615045
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index aa8152b03b..261d8efeb9 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -2298,8 +2298,10 @@ Decl *Sema::ActOnMethodDeclaration( << 0 << resultDeclType; return 0; } - } else // get the type for "id". + } else { // get the type for "id". resultDeclType = Context.getObjCIdType(); + Diag(MethodLoc, diag::warn_missing_method_return_type); + } ObjCMethodDecl* ObjCMethod = ObjCMethodDecl::Create(Context, MethodLoc, EndLoc, Sel, resultDeclType, |