]> granicus.if.org Git - clang/commitdiff
More title-casing of bug type names.
authorTed Kremenek <kremenek@apple.com>
Thu, 2 Apr 2009 02:44:03 +0000 (02:44 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 2 Apr 2009 02:44:03 +0000 (02:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68275 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CheckObjCInstMethSignature.cpp
lib/Analysis/CheckObjCUnusedIVars.cpp

index 2d100793c212af772956d7fa52bbb40f7eb07a08..a59ed884d49500c5df7d24fb2e7420b89f041375 100644 (file)
@@ -21,7 +21,7 @@
 #include "clang/AST/ASTContext.h"
 
 #include "llvm/ADT/DenseMap.h"
-#include <sstream>
+#include "llvm/Support/raw_ostream.h"
 
 using namespace clang;
 
@@ -46,7 +46,8 @@ static void CompareReturnTypes(ObjCMethodDecl* MethDerived,
   QualType ResAncestor = MethAncestor->getResultType(); 
   
   if (!AreTypesCompatible(ResDerived, ResAncestor, Ctx)) {
-    std::ostringstream os;
+    std::string sbuf;
+    llvm::raw_string_ostream os(sbuf);
     
     os << "The Objective-C class '"
        << MethDerived->getClassInterface()->getNameAsString()
@@ -64,7 +65,7 @@ static void CompareReturnTypes(ObjCMethodDecl* MethDerived,
        << "'.  These two types are incompatible, and may result in undefined "
           "behavior for clients of these classes.";
     
-    BR.EmitBasicReport("incompatible instance method return type",
+    BR.EmitBasicReport("Incompatible instance method return type",
                        os.str().c_str(), MethDerived->getLocStart());
   }
 }
index ef7b318b76991cb6897653b9e034315023226f49..658a6b189aaf091fccd805567db8bd9e921b7e60 100644 (file)
@@ -103,7 +103,7 @@ void clang::CheckObjCUnusedIvar(ObjCImplementationDecl* D, BugReporter& BR) {
          << "' is never used by the methods in its @implementation "
             "(although it may be used by category methods).";
 
-      BR.EmitBasicReport("unused ivar", "Optimization",
+      BR.EmitBasicReport("Unused instance variable", "Optimization",
                          os.str().c_str(), I->first->getLocation());
     }
 }