[clang-tidy][NFC] Enable RemoveSemicolon in clang-format config (#176926)
Welcome everyone to YAFI (yet another format improvements) in 2026:) Starting from `clang-format-16` we have quite useful option `RemoveSemicolon`.
This commit is contained in:
parent
b9760dc6fb
commit
fa98edd447
@ -7,3 +7,4 @@ KeepEmptyLines:
|
||||
LineEnding: LF
|
||||
QualifierAlignment: Left
|
||||
RemoveBracesLLVM: true
|
||||
RemoveSemicolon: true
|
||||
|
||||
@ -339,7 +339,7 @@ private:
|
||||
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
|
||||
|
||||
@ -49,7 +49,7 @@ private:
|
||||
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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -104,7 +104,7 @@ private:
|
||||
// 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 {
|
||||
@ -114,13 +114,13 @@ private:
|
||||
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;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace {
|
||||
struct Designators {
|
||||
Designators(const InitListExpr *InitList) : InitList(InitList) {
|
||||
assert(InitList->isSyntacticForm());
|
||||
};
|
||||
}
|
||||
|
||||
unsigned size() { return getCached().size(); }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user