Skip to content

Commit 7f28137

Browse files
[clang-tidy] Modernize RangeDescriptor (NFC)
1 parent 2db0812 commit 7f28137

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,6 @@ static bool containerIsConst(const Expr *ContainerExpr, bool Dereference) {
453453
return false;
454454
}
455455

456-
LoopConvertCheck::RangeDescriptor::RangeDescriptor()
457-
: ContainerNeedsDereference(false), DerefByConstRef(false),
458-
DerefByValue(false), NeedsReverseCall(false) {}
459-
460456
LoopConvertCheck::LoopConvertCheck(StringRef Name, ClangTidyContext *Context)
461457
: ClangTidyCheck(Name, Context), TUInfo(new TUTrackingInfo),
462458
MaxCopySize(Options.get("MaxCopySize", 16ULL)),

clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class LoopConvertCheck : public ClangTidyCheck {
2929

3030
private:
3131
struct RangeDescriptor {
32-
RangeDescriptor();
33-
bool ContainerNeedsDereference;
34-
bool DerefByConstRef;
35-
bool DerefByValue;
32+
RangeDescriptor() = default;
33+
bool ContainerNeedsDereference = false;
34+
bool DerefByConstRef = false;
35+
bool DerefByValue = false;
3636
std::string ContainerString;
3737
QualType ElemType;
38-
bool NeedsReverseCall;
38+
bool NeedsReverseCall = false;
3939
};
4040

4141
void getAliasRange(SourceManager &SM, SourceRange &DeclRange);

0 commit comments

Comments
 (0)