#include "clang/AST/ASTContext.h"
#include "llvm/ADT/DenseMap.h"
-#include <sstream>
+#include "llvm/Support/raw_ostream.h"
using namespace clang;
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()
<< "'. 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());
}
}
<< "' 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());
}
}