aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flang/examples/FlangOmpReport/FlangOmpReportVisitor.h2
-rw-r--r--flang/lib/Lower/Mangler.cpp2
-rw-r--r--flang/lib/Optimizer/Support/InternalNames.cpp2
-rw-r--r--flang/lib/Semantics/tools.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/flang/examples/FlangOmpReport/FlangOmpReportVisitor.h b/flang/examples/FlangOmpReport/FlangOmpReportVisitor.h
index d31fa8cc..188a7e9b 100644
--- a/flang/examples/FlangOmpReport/FlangOmpReportVisitor.h
+++ b/flang/examples/FlangOmpReport/FlangOmpReportVisitor.h
@@ -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;
diff --git a/flang/lib/Lower/Mangler.cpp b/flang/lib/Lower/Mangler.cpp
index d6b8518..3f90910 100644
--- a/flang/lib/Lower/Mangler.cpp
+++ b/flang/lib/Lower/Mangler.cpp
@@ -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)
diff --git a/flang/lib/Optimizer/Support/InternalNames.cpp b/flang/lib/Optimizer/Support/InternalNames.cpp
index 19a2740..b1cedb0 100644
--- a/flang/lib/Optimizer/Support/InternalNames.cpp
+++ b/flang/lib/Optimizer/Support/InternalNames.cpp
@@ -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;
diff --git a/flang/lib/Semantics/tools.cpp b/flang/lib/Semantics/tools.cpp
index d5eaed8..b977440 100644
--- a/flang/lib/Semantics/tools.cpp
+++ b/flang/lib/Semantics/tools.cpp
@@ -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();
}