aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2019-01-10 18:28:10 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2019-01-10 18:28:10 +0000
commit7697c704e135cefdc7f19ba5d6d4749944669be2 (patch)
treea2c6ffff4d468573d62517ced679c23ca73c9251
parentcf5ae62b3d7291ab7cf73ce9bdd9eca4a59191ab (diff)
[analyzer] [hotfix] Fix the tests
The error must have crept during the cherry-pick. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350870 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
index b4f58b55a3..4309603862 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
@@ -156,23 +156,25 @@ static void generateDiagnosticsForCallLike(ProgramStateRef CurrSt,
}
}
+ os << " returns ";
+
if (CurrV.getObjKind() == ObjKind::CF) {
- os << " a Core Foundation object of type '"
+ os << "a Core Foundation object of type '"
<< Sym->getType().getAsString() << "' with a ";
} else if (CurrV.getObjKind() == ObjKind::OS) {
- os << " an OSObject of type '" << getPrettyTypeName(Sym->getType())
+ os << "an OSObject of type '" << getPrettyTypeName(Sym->getType())
<< "' with a ";
} else if (CurrV.getObjKind() == ObjKind::Generalized) {
- os << " an object of type '" << Sym->getType().getAsString()
+ os << "an object of type '" << Sym->getType().getAsString()
<< "' with a ";
} else {
assert(CurrV.getObjKind() == ObjKind::ObjC);
QualType T = Sym->getType();
if (!isa<ObjCObjectPointerType>(T)) {
- os << " returns an Objective-C object with a ";
+ os << "an Objective-C object with a ";
} else {
const ObjCObjectPointerType *PT = cast<ObjCObjectPointerType>(T);
- os << " returns an instance of " << PT->getPointeeType().getAsString()
+ os << "an instance of " << PT->getPointeeType().getAsString()
<< " with a ";
}
}