aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/NSErrorChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/NSErrorChecker.cpp')
-rw-r--r--lib/Analysis/NSErrorChecker.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Analysis/NSErrorChecker.cpp b/lib/Analysis/NSErrorChecker.cpp
index 93b617b115..9a8d02215e 100644
--- a/lib/Analysis/NSErrorChecker.cpp
+++ b/lib/Analysis/NSErrorChecker.cpp
@@ -114,10 +114,13 @@ void NSErrorChecker::EmitRetTyWarning(BugReporter& BR, const Decl& CodeDecl) {
os << " should have a non-void return value to indicate whether or not an "
"error occurred";
+ // FIXME: Remove when we migrate EmitBasicReport to StringRef.
+ std::string cat = getCategory().str();
+
BR.EmitBasicReport(isNSErrorWarning
? "Bad return type when passing NSError**"
: "Bad return type when passing CFError*",
- getCategory().c_str(), os.str().c_str(),
+ cat.c_str(), os.str().c_str(),
CodeDecl.getLocation());
}