diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-22 16:28:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-22 16:28:24 +0000 |
commit | a4010c698cf76ec44ec53ff810705a6f021a3c7c (patch) | |
tree | 20934986a45c73f45ad06812a81dbbb56b8e3822 | |
parent | 0954b4564e4499548e0989e40530789d3c324d17 (diff) | |
download | bcm5719-llvm-a4010c698cf76ec44ec53ff810705a6f021a3c7c.tar.gz bcm5719-llvm-a4010c698cf76ec44ec53ff810705a6f021a3c7c.zip |
Don't use ostringstream (pulling in <sstream>) when creating the dead store diagnostic (simply not needed).
llvm-svn: 51432
-rw-r--r-- | clang/lib/Analysis/DeadStores.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Analysis/DeadStores.cpp b/clang/lib/Analysis/DeadStores.cpp index fb241fd5525..0f08b233b54 100644 --- a/clang/lib/Analysis/DeadStores.cpp +++ b/clang/lib/Analysis/DeadStores.cpp @@ -20,7 +20,6 @@ #include "clang/Basic/Diagnostic.h" #include "clang/AST/ASTContext.h" #include "llvm/Support/Compiler.h" -#include <sstream> using namespace clang; @@ -36,10 +35,12 @@ public: virtual ~DeadStoreObs() {} - unsigned GetDiag(VarDecl* VD) { - std::ostringstream os; - os << "value stored to '" << VD->getName() << "' is never used"; - return Diags.getCustomDiagID(Diagnostic::Warning, os.str().c_str()); + unsigned GetDiag(VarDecl* VD) { + std::string msg = "value stored to '" + std::string(VD->getName()) + + "' is never used"; + + return Diags.getCustomDiagID(Diagnostic::Warning, msg.c_str()); + } void CheckDeclRef(DeclRefExpr* DR, Expr* Val, |