Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ KeepEmptyLines:
LineEnding: LF
QualifierAlignment: Left
RemoveBracesLLVM: true
RemoveSemicolon: true
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-tidy/ClangTidy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class ClangTidyASTConsumer : public MultiplexConsumer {
std::unique_ptr<ClangTidyProfiling> Profiling;
std::unique_ptr<ast_matchers::MatchFinder> Finder;
std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
void anchor() override {};
void anchor() override {}
};

} // namespace
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-tidy/GlobList.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class GlobList {
SmallVector<GlobListItem, 0> Items;

public:
const SmallVectorImpl<GlobListItem> &getItems() const { return Items; };
const SmallVectorImpl<GlobListItem> &getItems() const { return Items; }
};

/// A \p GlobList that caches search results, so that search is performed only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ void NotNullTerminatedResultCheck::registerMatchers(MatchFinder *Finder) {
std::optional<unsigned> SourcePos, unsigned LengthPos,
bool WithIncrease)
: Name(Name), DestinationPos(DestinationPos), SourcePos(SourcePos),
LengthPos(LengthPos), WithIncrease(WithIncrease) {};
LengthPos(LengthPos), WithIncrease(WithIncrease) {}

StringRef Name;
std::optional<unsigned> DestinationPos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class CharExpressionDetector {
// Returns true if `E` is an character constant.
bool isCharConstant(const Expr *E) const {
return isCharTyped(E) && isCharValuedConstant(E);
};
}

// Returns true if `E` is an integer constant which fits in `CharType`.
bool isCharValuedConstant(const Expr *E) const {
Expand All @@ -114,13 +114,13 @@ class CharExpressionDetector {
if (!E->EvaluateAsInt(EvalResult, Ctx, Expr::SE_AllowSideEffects))
return false;
return EvalResult.Val.getInt().getActiveBits() <= Ctx.getTypeSize(CharType);
};
}

// Returns true if `E` has the right character type.
bool isCharTyped(const Expr *E) const {
return E->getType().getCanonicalType().getTypePtr() ==
CharType.getTypePtr();
};
}

const QualType CharType;
const ASTContext &Ctx;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace {
struct Designators {
Designators(const InitListExpr *InitList) : InitList(InitList) {
assert(InitList->isSyntacticForm());
};
}

unsigned size() { return getCached().size(); }

Expand Down