diff options
| author | George Karpenkov <ekarpenkov@apple.com> | 2019-01-10 18:28:10 +0000 |
|---|---|---|
| committer | George Karpenkov <ekarpenkov@apple.com> | 2019-01-10 18:28:10 +0000 |
| commit | 3c1e066dca92c2ceded23cee65b9385688660626 (patch) | |
| tree | c569830013c2d83a212f33e56d3b9163b016b943 /clang | |
| parent | 0bb17c4634fe639a17c06fab871af43c621e34c4 (diff) | |
| download | bcm5719-llvm-3c1e066dca92c2ceded23cee65b9385688660626.tar.gz bcm5719-llvm-3c1e066dca92c2ceded23cee65b9385688660626.zip | |
[analyzer] [hotfix] Fix the tests
The error must have crept during the cherry-pick.
llvm-svn: 350870
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp index b4f58b55a3e..4309603862a 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp +++ b/clang/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 "; } } |

