[cfe-commits] r90084 - in /cfe/trunk/lib/Analysis: BasicObjCFoundationChecks.cpp NSErrorChecker.cpp UndefResultChecker.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Nov 29 10:03:29 PST 2009
Author: d0k
Date: Sun Nov 29 12:03:28 2009
New Revision: 90084
URL: http://llvm.org/viewvc/llvm-project?rev=90084&view=rev
Log:
Kill some unnecessary calls to c_str().
Modified:
cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp
cfe/trunk/lib/Analysis/NSErrorChecker.cpp
cfe/trunk/lib/Analysis/UndefResultChecker.cpp
Modified: cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp?rev=90084&r1=90083&r2=90084&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp Sun Nov 29 12:03:28 2009
@@ -87,7 +87,7 @@
// by the BugReporter object 'BR' once we call BR.EmitWarning.
if (!BT) BT = new APIMisuse("nil argument");
- RangedBugReport *R = new RangedBugReport(*BT, os.str().c_str(), N);
+ RangedBugReport *R = new RangedBugReport(*BT, os.str(), N);
R->addRange(ME->getArg(Arg)->getSourceRange());
BR.EmitReport(R);
}
@@ -435,7 +435,7 @@
// Lazily create the BugType object. This will be owned
// by the BugReporter object 'BR' once we call BR.EmitWarning.
if (!BT) BT = new APIMisuse("Bad use of CFNumberCreate");
- RangedBugReport *report = new RangedBugReport(*BT, os.str().c_str(), N);
+ RangedBugReport *report = new RangedBugReport(*BT, os.str(), N);
report->addRange(Ex->getSourceRange());
BR.EmitReport(report);
}
Modified: cfe/trunk/lib/Analysis/NSErrorChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/NSErrorChecker.cpp?rev=90084&r1=90083&r2=90084&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/NSErrorChecker.cpp (original)
+++ cfe/trunk/lib/Analysis/NSErrorChecker.cpp Sun Nov 29 12:03:28 2009
@@ -231,7 +231,7 @@
os << Param->getNameAsString() << "' may be null.";
- BugReport *report = new BugReport(*this, os.str().c_str(), *I);
+ BugReport *report = new BugReport(*this, os.str(), *I);
// FIXME: Notable symbols are now part of the report. We should
// add support for notable symbols in BugReport.
// BR.addNotableSymbol(SV->getSymbol());
Modified: cfe/trunk/lib/Analysis/UndefResultChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/UndefResultChecker.cpp?rev=90084&r1=90083&r2=90084&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/UndefResultChecker.cpp (original)
+++ cfe/trunk/lib/Analysis/UndefResultChecker.cpp Sun Nov 29 12:03:28 2009
@@ -74,8 +74,7 @@
<< BinaryOperator::getOpcodeStr(B->getOpcode())
<< "' expression is undefined";
}
- EnhancedBugReport *report = new EnhancedBugReport(*BT,
- OS.str().str().c_str(), N);
+ EnhancedBugReport *report = new EnhancedBugReport(*BT, OS.str(), N);
if (Ex) {
report->addRange(Ex->getSourceRange());
report->addVisitorCreator(bugreporter::registerTrackNullOrUndefValue, Ex);
More information about the cfe-commits
mailing list