Skip to content

Commit

Permalink
[clang-tidy] Modernize RangeDescriptor (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed May 13, 2023
1 parent 2db0812 commit 7f28137
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
10 changes: 5 additions & 5 deletions clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7f28137

Please sign in to comment.