summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/constantparam.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-13 08:30:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-13 11:24:43 +0100
commit38dcd3bc735633f2a4857849ef14917bbffcdd11 (patch)
tree98dcde5a1cacde29b33d563a3aece3fc746e4c5b /compilerplugins/clang/constantparam.cxx
parent03d2fa836ebd5f8c05d1bda99c01be45a57b65ea (diff)
Get rid of some unnecessary llvm::StringRef -> std::string conversions
(as discussed in the commit message of ce1d8e20a708ed031f2336770a41fbe501fe8225 "Adapt to '[ADT] Make StringRef's std::string conversion operator explicit'"; there are more of those that cannot easily be dropped, though). Change-Id: Ib2e223f7de96ad8859eab165daa759b480326c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88582 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/constantparam.cxx')
-rw-r--r--compilerplugins/clang/constantparam.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/constantparam.cxx b/compilerplugins/clang/constantparam.cxx
index dd9bddd086c5..71c0f69da61a 100644
--- a/compilerplugins/clang/constantparam.cxx
+++ b/compilerplugins/clang/constantparam.cxx
@@ -275,7 +275,7 @@ bool ConstantParam::VisitCallExpr(const CallExpr * callExpr) {
std::string callValue = getCallValue(valExpr);
std::string paramName = i < functionDecl->getNumParams()
? functionDecl->getParamDecl(i)->getName().str()
- : llvm::StringRef("###" + std::to_string(i)).str();
+ : "###" + std::to_string(i);
addToCallSet(functionDecl, i, paramName, callValue);
}
return true;
@@ -299,7 +299,7 @@ bool ConstantParam::VisitCXXConstructExpr( const CXXConstructExpr* constructExpr
std::string callValue = getCallValue(valExpr);
std::string paramName = i < constructorDecl->getNumParams()
? constructorDecl->getParamDecl(i)->getName().str()
- : llvm::StringRef("###" + std::to_string(i)).str();
+ : "###" + std::to_string(i);
addToCallSet(constructorDecl, i, paramName, callValue);
}
return true;