r350870 - [analyzer] [hotfix] Fix the tests

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 10 10:28:11 PST 2019


Author: george.karpenkov
Date: Thu Jan 10 10:28:10 2019
New Revision: 350870

URL: http://llvm.org/viewvc/llvm-project?rev=350870&view=rev
Log:
[analyzer] [hotfix] Fix the tests

The error must have crept during the cherry-pick.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp?rev=350870&r1=350869&r2=350870&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp Thu Jan 10 10:28:10 2019
@@ -156,23 +156,25 @@ static void generateDiagnosticsForCallLi
     }
   }
 
+   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 ";
     }
   }




More information about the cfe-commits mailing list