From 7cca821e1acf0f1b4fe892c3111bfb2086832e4e Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 19 Mar 2013 07:04:25 +0000 Subject: Add a clarifying note when a return statement is rejected because we expect a related result type. rdar://12493140 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177378 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Sema/Sema.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/clang/Sema') diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 9205e2a4a8..3f3fcb57a1 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -7026,6 +7026,11 @@ public: /// with a related result type, emit a note describing what happened. void EmitRelatedResultTypeNote(const Expr *E); + /// \brief Given that we had incompatible pointer types in a return + /// statement, check whether we're in a method with a related result + /// type, and if so, emit a note describing what happened. + void EmitRelatedResultTypeNoteForReturn(QualType destType); + /// CheckBooleanCondition - Diagnose problems involving the use of /// the given expression as a boolean condition (e.g. in an if /// statement). Also performs the standard function and array -- cgit v1.2.3-18-g5258