diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Analysis/CheckObjCInstMethSignature.cpp | 7 | ||||
-rw-r--r-- | clang/lib/Analysis/CheckObjCUnusedIVars.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Analysis/CheckObjCInstMethSignature.cpp b/clang/lib/Analysis/CheckObjCInstMethSignature.cpp index 2d100793c21..a59ed884d49 100644 --- a/clang/lib/Analysis/CheckObjCInstMethSignature.cpp +++ b/clang/lib/Analysis/CheckObjCInstMethSignature.cpp @@ -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()); } } diff --git a/clang/lib/Analysis/CheckObjCUnusedIVars.cpp b/clang/lib/Analysis/CheckObjCUnusedIVars.cpp index ef7b318b769..658a6b189aa 100644 --- a/clang/lib/Analysis/CheckObjCUnusedIVars.cpp +++ b/clang/lib/Analysis/CheckObjCUnusedIVars.cpp @@ -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()); } } |