[flang] Remove redundant string initialization (NFC)
Identified with readability-redundant-string-init.
This commit is contained in:
parent
3a6da9ebcb
commit
a8c294d6aa
|
@ -80,7 +80,7 @@ struct OpenMPCounterVisitor {
|
|||
void Post(const OmpClause &c);
|
||||
void PostClauseCommon(const ClauseInfo &ci);
|
||||
|
||||
std::string clauseDetails{""};
|
||||
std::string clauseDetails;
|
||||
llvm::SmallVector<LogRecord> constructClauses;
|
||||
llvm::SmallVector<OmpWrapperType *> ompWrapperStack;
|
||||
llvm::DenseMap<OmpWrapperType *, llvm::SmallVector<ClauseInfo>> clauseStrings;
|
||||
|
|
|
@ -222,7 +222,7 @@ std::string Fortran::lower::mangle::mangleArrayLiteral(
|
|||
const Fortran::evaluate::ConstantSubscripts &shape,
|
||||
Fortran::common::TypeCategory cat, int kind,
|
||||
Fortran::common::ConstantSubscript charLen) {
|
||||
std::string typeId = "";
|
||||
std::string typeId;
|
||||
for (Fortran::evaluate::ConstantSubscript extent : shape)
|
||||
typeId.append(std::to_string(extent)).append("x");
|
||||
if (charLen >= 0)
|
||||
|
|
|
@ -329,7 +329,7 @@ static std::string
|
|||
mangleTypeDescriptorKinds(llvm::ArrayRef<std::int64_t> kinds) {
|
||||
if (kinds.empty())
|
||||
return "";
|
||||
std::string result = "";
|
||||
std::string result;
|
||||
for (std::int64_t kind : kinds)
|
||||
result += "." + std::to_string(kind);
|
||||
return result;
|
||||
|
|
|
@ -1294,7 +1294,7 @@ template <ComponentKind componentKind>
|
|||
std::string
|
||||
ComponentIterator<componentKind>::const_iterator::BuildResultDesignatorName()
|
||||
const {
|
||||
std::string designator{""};
|
||||
std::string designator;
|
||||
for (const auto &node : componentPath_) {
|
||||
designator += "%" + DEREF(node.component()).name().ToString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue