diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 506581a53c..6500e889c8 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -5035,13 +5035,11 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, // enabled. QualType ResultType; if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(dcl)) { - ResultType = FD->getResultType(); - } - else { + AnalysisWarnings.IssueWarnings(WP, FD); + } else { ObjCMethodDecl *MD = cast<ObjCMethodDecl>(dcl); - ResultType = MD->getResultType(); + AnalysisWarnings.IssueWarnings(WP, MD); } - AnalysisWarnings.IssueWarnings(WP, dcl); } assert(ExprTemporaries.empty() && "Leftover temporaries in function"); |