[clang-tools-extra] 7f28137 - [clang-tidy] Modernize RangeDescriptor (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri May 12 23:19:33 PDT 2023
Author: Kazu Hirata
Date: 2023-05-12T23:19:19-07:00
New Revision: 7f28137b5d2cb0deda4c6171665ef15accfab6ab
URL: https://github.com/llvm/llvm-project/commit/7f28137b5d2cb0deda4c6171665ef15accfab6ab
DIFF: https://github.com/llvm/llvm-project/commit/7f28137b5d2cb0deda4c6171665ef15accfab6ab.diff
LOG: [clang-tidy] Modernize RangeDescriptor (NFC)
Added:
Modified:
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
index fe9412f8d068c..87504e93ca240 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
@@ -453,10 +453,6 @@ static bool containerIsConst(const Expr *ContainerExpr, bool Dereference) {
return false;
}
-LoopConvertCheck::RangeDescriptor::RangeDescriptor()
- : ContainerNeedsDereference(false), DerefByConstRef(false),
- DerefByValue(false), NeedsReverseCall(false) {}
-
LoopConvertCheck::LoopConvertCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context), TUInfo(new TUTrackingInfo),
MaxCopySize(Options.get("MaxCopySize", 16ULL)),
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
index 4e57b22662da7..b4f729d3ac538 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
@@ -29,13 +29,13 @@ class LoopConvertCheck : public ClangTidyCheck {
private:
struct RangeDescriptor {
- RangeDescriptor();
- bool ContainerNeedsDereference;
- bool DerefByConstRef;
- bool DerefByValue;
+ RangeDescriptor() = default;
+ bool ContainerNeedsDereference = false;
+ bool DerefByConstRef = false;
+ bool DerefByValue = false;
std::string ContainerString;
QualType ElemType;
- bool NeedsReverseCall;
+ bool NeedsReverseCall = false;
};
void getAliasRange(SourceManager &SM, SourceRange &DeclRange);
More information about the cfe-commits
mailing list