summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-09-20 21:38:35 +0000
committerAnna Zaks <ganna@apple.com>2011-09-20 21:38:35 +0000
commit590dd8e0959d8df5621827768987c4792b74fc06 (patch)
tree6e7b7174dbee28f6a7fbc1b4273db489d21d99d0 /lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
parent77ce46d769b581b8a6ddb0d58231b8be9a8a6026 (diff)
downloadclang-590dd8e0959d8df5621827768987c4792b74fc06.tar.gz
[analyzer] Refactor PathDiagnosticLocation: Make PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation.
(Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp b/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
index 4621eab503..4355fe0a3f 100644
--- a/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
+++ b/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
@@ -66,8 +66,12 @@ static void CompareReturnTypes(const ObjCMethodDecl *MethDerived,
<< "'. These two types are incompatible, and may result in undefined "
"behavior for clients of these classes.";
+ PathDiagnosticLocation MethDLoc =
+ PathDiagnosticLocation::createBegin(MethDerived,
+ BR.getSourceManager());
+
BR.EmitBasicReport("Incompatible instance method return type",
- os.str(), MethDerived->getLocStart());
+ os.str(), MethDLoc);
}
}