[Mlir-commits] [mlir] 87d627b - Remove redundant string initialization (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Sun Jul 24 12:27:32 PDT 2022
Author: Kazu Hirata
Date: 2022-07-24T12:27:11-07:00
New Revision: 87d627b623eb392610c073e6334782982373959a
URL: https://github.com/llvm/llvm-project/commit/87d627b623eb392610c073e6334782982373959a
DIFF: https://github.com/llvm/llvm-project/commit/87d627b623eb392610c073e6334782982373959a.diff
LOG: Remove redundant string initialization (NFC)
Identified with readability-redundant-string-init.
Added:
Modified:
clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
mlir/lib/Pass/Pass.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp b/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
index f2f2cf674fa7a..30ff058619550 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
@@ -40,7 +40,7 @@ static std::string getTypeStr(const QualType &OrigT, const Decl &D,
QualType T = OrigT;
PrintingPolicy Policy(D.getASTContext().getLangOpts());
Policy.SuppressStrongLifetime = true;
- std::string Prefix = "";
+ std::string Prefix;
// If the nullability is specified via a property attribute, use the shorter
// `nullable` form for the method parameter.
if (PropertyAttributes & ObjCPropertyAttribute::kind_nullability) {
diff --git a/mlir/lib/Pass/Pass.cpp b/mlir/lib/Pass/Pass.cpp
index c33d9233474f9..a3deafdc7a79e 100644
--- a/mlir/lib/Pass/Pass.cpp
+++ b/mlir/lib/Pass/Pass.cpp
@@ -90,7 +90,7 @@ struct OpPassManagerImpl {
: name(name == OpPassManager::getAnyOpAnchorName() ? "" : name.str()),
initializationGeneration(0), nesting(nesting) {}
OpPassManagerImpl(OpPassManager::Nesting nesting)
- : name(""), initializationGeneration(0), nesting(nesting) {}
+ : initializationGeneration(0), nesting(nesting) {}
OpPassManagerImpl(const OpPassManagerImpl &rhs)
: name(rhs.name), opName(rhs.opName),
initializationGeneration(rhs.initializationGeneration),
More information about the Mlir-commits
mailing list