Skip to content

Commit b811aab

Browse files
vbvictorDhruvSrivastavaX
authored andcommitted
[clang-tidy][NFC] run clang-format over clang-tidy checks and tool code. (llvm#143324)
1 parent 0c765da commit b811aab

File tree

52 files changed

+161
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+161
-172
lines changed

clang-tools-extra/clang-tidy/ClangTidy.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ ClangTidyASTConsumerFactory::createASTConsumer(
419419

420420
std::unique_ptr<ClangTidyProfiling> Profiling;
421421
if (Context.getEnableProfiling()) {
422-
Profiling = std::make_unique<ClangTidyProfiling>(
423-
Context.getProfileStorageParams());
422+
Profiling =
423+
std::make_unique<ClangTidyProfiling>(Context.getProfileStorageParams());
424424
FinderOptions.CheckProfiling.emplace(Profiling->Records);
425425
}
426426

@@ -432,8 +432,8 @@ ClangTidyASTConsumerFactory::createASTConsumer(
432432

433433
if (Context.canEnableModuleHeadersParsing() &&
434434
Context.getLangOpts().Modules && OverlayFS != nullptr) {
435-
auto ModuleExpander = std::make_unique<ExpandModularHeadersPPCallbacks>(
436-
&Compiler, OverlayFS);
435+
auto ModuleExpander =
436+
std::make_unique<ExpandModularHeadersPPCallbacks>(&Compiler, OverlayFS);
437437
ModuleExpanderPP = ModuleExpander->getPreprocessor();
438438
PP->addPPCallbacks(std::move(ModuleExpander));
439439
}
@@ -497,7 +497,7 @@ getCheckNames(const ClangTidyOptions &Options,
497497
bool AllowEnablingAnalyzerAlphaCheckers) {
498498
clang::tidy::ClangTidyContext Context(
499499
std::make_unique<DefaultOptionsProvider>(ClangTidyGlobalOptions(),
500-
Options),
500+
Options),
501501
AllowEnablingAnalyzerAlphaCheckers);
502502
ClangTidyASTConsumerFactory Factory(Context);
503503
return Factory.getCheckNames();
@@ -508,7 +508,7 @@ getCheckOptions(const ClangTidyOptions &Options,
508508
bool AllowEnablingAnalyzerAlphaCheckers) {
509509
clang::tidy::ClangTidyContext Context(
510510
std::make_unique<DefaultOptionsProvider>(ClangTidyGlobalOptions(),
511-
Options),
511+
Options),
512512
AllowEnablingAnalyzerAlphaCheckers);
513513
ClangTidyDiagnosticConsumer DiagConsumer(Context);
514514
auto DiagOpts = std::make_unique<DiagnosticOptions>();

clang-tools-extra/clang-tidy/ClangTidyCheck.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ void ClangTidyCheck::OptionsView::store<bool>(
530530
ClangTidyOptions::OptionMap &Options, StringRef LocalName,
531531
bool Value) const;
532532

533-
534533
} // namespace tidy
535534
} // namespace clang
536535

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,10 @@ class ClangTidyContext {
217217
using DiagLevelAndFormatString = std::pair<DiagnosticIDs::Level, std::string>;
218218
DiagLevelAndFormatString getDiagLevelAndFormatString(unsigned DiagnosticID,
219219
SourceLocation Loc) {
220-
return {
221-
static_cast<DiagnosticIDs::Level>(
222-
DiagEngine->getDiagnosticLevel(DiagnosticID, Loc)),
223-
std::string(
224-
DiagEngine->getDiagnosticIDs()->getDescription(DiagnosticID))};
220+
return {static_cast<DiagnosticIDs::Level>(
221+
DiagEngine->getDiagnosticLevel(DiagnosticID, Loc)),
222+
std::string(
223+
DiagEngine->getDiagnosticIDs()->getDescription(DiagnosticID))};
225224
}
226225

227226
void setOptionsCollector(llvm::StringSet<> *Collector) {

clang-tools-extra/clang-tidy/ClangTidyOptions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ struct NOptionMap {
7070
NOptionMap(IO &, const ClangTidyOptions::OptionMap &OptionMap) {
7171
Options.reserve(OptionMap.size());
7272
for (const auto &KeyValue : OptionMap)
73-
Options.emplace_back(std::string(KeyValue.getKey()), KeyValue.getValue().Value);
73+
Options.emplace_back(std::string(KeyValue.getKey()),
74+
KeyValue.getValue().Value);
7475
}
7576
ClangTidyOptions::OptionMap denormalize(IO &) {
7677
ClangTidyOptions::OptionMap Map;

clang-tools-extra/clang-tidy/ClangTidyOptions.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ class FileOptionsBaseProvider : public DefaultOptionsProvider {
204204
protected:
205205
// A pair of configuration file base name and a function parsing
206206
// configuration from text in the corresponding format.
207-
using ConfigFileHandler = std::pair<std::string, std::function<llvm::ErrorOr<ClangTidyOptions> (llvm::MemoryBufferRef)>>;
207+
using ConfigFileHandler =
208+
std::pair<std::string, std::function<llvm::ErrorOr<ClangTidyOptions>(
209+
llvm::MemoryBufferRef)>>;
208210

209211
/// Configuration file handlers listed in the order of priority.
210212
///

clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class ExpandModularHeadersPPCallbacks::FileRecorder {
4949
FilesToRecord.erase(File);
5050
}
5151

52-
/// Makes sure we have contents for all the files we were interested in. Ideally
53-
/// `FilesToRecord` should be empty.
52+
/// Makes sure we have contents for all the files we were interested in.
53+
/// Ideally `FilesToRecord` should be empty.
5454
void checkAllFilesRecorded() {
5555
LLVM_DEBUG({
5656
for (auto FileEntry : FilesToRecord)

clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ namespace tooling {
3535
/// including the contents of the modular headers and all their transitive
3636
/// includes.
3737
///
38-
/// This allows existing tools based on PPCallbacks to retain their functionality
39-
/// when running with C++ modules enabled. This only works in the backwards
40-
/// compatible modules mode, i.e. when code can still be parsed in non-modular
41-
/// way.
38+
/// This allows existing tools based on PPCallbacks to retain their
39+
/// functionality when running with C++ modules enabled. This only works in the
40+
/// backwards compatible modules mode, i.e. when code can still be parsed in
41+
/// non-modular way.
4242
class ExpandModularHeadersPPCallbacks : public PPCallbacks {
4343
public:
4444
ExpandModularHeadersPPCallbacks(

clang-tools-extra/clang-tidy/concurrency/ConcurrencyTidyModule.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class ConcurrencyModule : public ClangTidyModule {
2727

2828
} // namespace concurrency
2929

30-
// Register the ConcurrencyTidyModule using this statically initialized variable.
30+
// Register the ConcurrencyTidyModule using this statically initialized
31+
// variable.
3132
static ClangTidyModuleRegistry::Add<concurrency::ConcurrencyModule>
3233
X("concurrency-module", "Adds concurrency checks.");
3334

clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313

1414
namespace clang::tidy::hicpp {
1515

16-
/// Check for thrown exceptions and enforce they are all derived from std::exception.
16+
/// Check for thrown exceptions and enforce they are all derived from
17+
/// std::exception.
1718
///
1819
/// For the user-facing documentation see:
1920
/// http://clang.llvm.org/extra/clang-tidy/checks/hicpp/exception-baseclass.html

clang-tools-extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void MultiwayPathsCoveredCheck::check(const MatchFinder::MatchResult &Result) {
113113
}
114114
// Warns for degenerated 'switch' statements that neither define a case nor
115115
// a default label.
116-
// FIXME: Evaluate, if emitting a fix-it to simplify that statement is
116+
// FIXME: Evaluate, if emitting a fix-it to simplify that statement is
117117
// reasonable.
118118
if (!SwitchHasDefault && SwitchCaseCount == 0) {
119119
diag(Switch->getBeginLoc(),

clang-tools-extra/clang-tidy/linuxkernel/MustCheckErrsCheck.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ void MustCheckErrsCheck::registerMatchers(MatchFinder *Finder) {
1919
"ERR_CAST", "PTR_ERR_OR_ZERO"));
2020
auto NonCheckingStmts = stmt(anyOf(compoundStmt(), labelStmt()));
2121
Finder->addMatcher(
22-
callExpr(callee(ErrFn), hasParent(NonCheckingStmts)).bind("call"),
23-
this);
22+
callExpr(callee(ErrFn), hasParent(NonCheckingStmts)).bind("call"), this);
2423

2524
auto ReturnToCheck = returnStmt(hasReturnValue(callExpr(callee(ErrFn))));
2625
auto ReturnsErrFn = functionDecl(hasDescendant(ReturnToCheck));

clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ namespace clang::tidy::llvm_check {
1515

1616
/// Looks at conditionals and finds and replaces cases of ``cast<>``, which will
1717
/// assert rather than return a null pointer, and ``dyn_cast<>`` where
18-
/// the return value is not captured. Additionally, finds and replaces cases that match the
19-
/// pattern ``var && isa<X>(var)``, where ``var`` is evaluated twice.
18+
/// the return value is not captured. Additionally, finds and replaces cases
19+
/// that match the pattern ``var && isa<X>(var)``, where ``var`` is evaluated
20+
/// twice.
2021
///
2122
/// Finds cases like these:
2223
/// \code

clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace clang::tidy::misc {
1515

16-
///checks for locations that do not throw by value
16+
/// Checks for locations that do not throw by value
1717
// or catch by reference.
1818
// The check is C++ only. It checks that all throw locations
1919
// throw by value and not by pointer. Additionally it

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace clang::tidy::modernize {
1515

16-
/// This check warns the uses of the deprecated member types of ``std::ios_base``
17-
/// and replaces those that have a non-deprecated equivalent.
16+
/// This check warns the uses of the deprecated member types of
17+
/// ``std::ios_base`` and replaces those that have a non-deprecated equivalent.
1818
///
1919
/// For the user-facing documentation see:
2020
/// http://clang.llvm.org/extra/clang-tidy/checks/modernize/deprecated-ios-base-aliases.html

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,8 @@ bool ForLoopIndexUseVisitor::TraverseArraySubscriptExpr(ArraySubscriptExpr *E) {
688688
if (!isIndexInSubscriptExpr(E->getIdx(), IndexVar))
689689
return VisitorBase::TraverseArraySubscriptExpr(E);
690690

691-
if ((ContainerExpr &&
692-
!areSameExpr(Context, Arr->IgnoreParenImpCasts(),
693-
ContainerExpr->IgnoreParenImpCasts())) ||
691+
if ((ContainerExpr && !areSameExpr(Context, Arr->IgnoreParenImpCasts(),
692+
ContainerExpr->IgnoreParenImpCasts())) ||
694693
!arrayMatchesBoundExpr(Context, Arr->IgnoreImpCasts()->getType(),
695694
ArrayBoundExpr)) {
696695
// If we have already discovered the array being indexed and this isn't it

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ class MacroToEnumCallbacks : public PPCallbacks {
161161
checkName(MacroNameTok);
162162
}
163163
void Elifdef(SourceLocation Loc, SourceRange ConditionRange,
164-
SourceLocation IfLoc) override {
164+
SourceLocation IfLoc) override {
165165
PPCallbacks::Elifdef(Loc, ConditionRange, IfLoc);
166166
}
167167
void Elifndef(SourceLocation Loc, const Token &MacroNameTok,
168168
const MacroDefinition &MD) override {
169169
checkName(MacroNameTok);
170170
}
171171
void Elifndef(SourceLocation Loc, SourceRange ConditionRange,
172-
SourceLocation IfLoc) override {
172+
SourceLocation IfLoc) override {
173173
PPCallbacks::Elifndef(Loc, ConditionRange, IfLoc);
174174
}
175175
void Endif(SourceLocation Loc, SourceLocation IfLoc) override;
@@ -316,8 +316,7 @@ void MacroToEnumCallbacks::FileChanged(SourceLocation Loc,
316316
CurrentFile = &Files.back();
317317
}
318318

319-
bool MacroToEnumCallbacks::isInitializer(ArrayRef<Token> MacroTokens)
320-
{
319+
bool MacroToEnumCallbacks::isInitializer(ArrayRef<Token> MacroTokens) {
321320
IntegralLiteralExpressionMatcher Matcher(MacroTokens, LangOpts.C99 == 0);
322321
bool Matched = Matcher.match();
323322
bool IsC = !LangOpts.CPlusPlus;
@@ -328,7 +327,6 @@ bool MacroToEnumCallbacks::isInitializer(ArrayRef<Token> MacroTokens)
328327
return Matched;
329328
}
330329

331-
332330
// Any defined but rejected macro is scanned for identifiers that
333331
// are to be excluded as enums.
334332
void MacroToEnumCallbacks::MacroDefined(const Token &MacroNameTok,
@@ -444,8 +442,8 @@ void MacroToEnumCallbacks::invalidateExpressionNames() {
444442
}
445443

446444
void MacroToEnumCallbacks::EndOfMainFile() {
447-
invalidateExpressionNames();
448-
issueDiagnostics();
445+
invalidateExpressionNames();
446+
issueDiagnostics();
449447
}
450448

451449
void MacroToEnumCallbacks::invalidateRange(SourceRange Range) {
@@ -517,7 +515,8 @@ void MacroToEnumCallbacks::fixEnumMacro(const MacroList &MacroList) const {
517515
void MacroToEnumCheck::registerPPCallbacks(const SourceManager &SM,
518516
Preprocessor *PP,
519517
Preprocessor *ModuleExpanderPP) {
520-
auto Callback = std::make_unique<MacroToEnumCallbacks>(this, getLangOpts(), SM);
518+
auto Callback =
519+
std::make_unique<MacroToEnumCallbacks>(this, getLangOpts(), SM);
521520
PPCallback = Callback.get();
522521
PP->addPPCallbacks(std::move(Callback));
523522
}
@@ -540,7 +539,7 @@ void MacroToEnumCheck::check(
540539
const ast_matchers::MatchFinder::MatchResult &Result) {
541540
auto *TLDecl = Result.Nodes.getNodeAs<Decl>("top");
542541
if (TLDecl == nullptr)
543-
return;
542+
return;
544543

545544
SourceRange Range = TLDecl->getSourceRange();
546545
if (auto *TemplateFn = Result.Nodes.getNodeAs<FunctionTemplateDecl>("top")) {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ bool MakeSmartPtrCheck::replaceNew(DiagnosticBuilder &Diag,
361361
Diag << FixItHint::CreateRemoval(
362362
SourceRange(NewStart, InitRange.getBegin()));
363363
Diag << FixItHint::CreateRemoval(SourceRange(InitRange.getEnd(), NewEnd));
364-
}
365-
else {
364+
} else {
366365
// New array expression with default/value initialization:
367366
// smart_ptr<Foo[]>(new int[5]());
368367
// smart_ptr<Foo[]>(new Foo[5]());

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ class ModernizeModule : public ClangTidyModule {
110110
CheckFactories.registerCheck<UseDefaultMemberInitCheck>(
111111
"modernize-use-default-member-init");
112112
CheckFactories.registerCheck<UseEmplaceCheck>("modernize-use-emplace");
113-
CheckFactories.registerCheck<UseEqualsDefaultCheck>("modernize-use-equals-default");
113+
CheckFactories.registerCheck<UseEqualsDefaultCheck>(
114+
"modernize-use-equals-default");
114115
CheckFactories.registerCheck<UseEqualsDeleteCheck>(
115116
"modernize-use-equals-delete");
116-
CheckFactories.registerCheck<UseNodiscardCheck>(
117-
"modernize-use-nodiscard");
117+
CheckFactories.registerCheck<UseNodiscardCheck>("modernize-use-nodiscard");
118118
CheckFactories.registerCheck<UseNoexceptCheck>("modernize-use-noexcept");
119119
CheckFactories.registerCheck<UseNullptrCheck>("modernize-use-nullptr");
120120
CheckFactories.registerCheck<UseOverrideCheck>("modernize-use-override");

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ void ReplaceAutoPtrCheck::check(const MatchFinder::MatchResult &Result) {
141141
"auto_ptr")
142142
return;
143143

144-
SourceLocation EndLoc =
145-
AutoPtrLoc.getLocWithOffset(strlen("auto_ptr") - 1);
144+
SourceLocation EndLoc = AutoPtrLoc.getLocWithOffset(strlen("auto_ptr") - 1);
146145
diag(AutoPtrLoc, "auto_ptr is deprecated, use unique_ptr instead")
147146
<< FixItHint::CreateReplacement(SourceRange(AutoPtrLoc, EndLoc),
148147
"unique_ptr");

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ size_t getTypeNameLength(bool RemoveStars, StringRef Text) {
3838
else if (C == '>')
3939
--TemplateTypenameCntr;
4040
const CharType NextChar =
41-
isAlphanumeric(C)
42-
? Alpha
43-
: (isWhitespace(C) ||
44-
(!RemoveStars && TemplateTypenameCntr == 0 && C == '*'))
45-
? Space
46-
: Punctuation;
41+
isAlphanumeric(C) ? Alpha
42+
: (isWhitespace(C) ||
43+
(!RemoveStars && TemplateTypenameCntr == 0 && C == '*'))
44+
? Space
45+
: Punctuation;
4746
if (NextChar != Space) {
4847
++NumChars; // Count the non-space character.
4948
if (LastChar == Space && NextChar == Alpha && BeforeSpace == Alpha)
@@ -444,10 +443,10 @@ void UseAutoCheck::check(const MatchFinder::MatchResult &Result) {
444443
replaceIterators(Decl, Result.Context);
445444
} else if (const auto *Decl =
446445
Result.Nodes.getNodeAs<DeclStmt>(DeclWithNewId)) {
447-
replaceExpr(Decl, Result.Context,
448-
[](const Expr *Expr) { return Expr->getType(); },
449-
"use auto when initializing with new to avoid "
450-
"duplicating the type name");
446+
replaceExpr(
447+
Decl, Result.Context, [](const Expr *Expr) { return Expr->getType(); },
448+
"use auto when initializing with new to avoid "
449+
"duplicating the type name");
451450
} else if (const auto *Decl =
452451
Result.Nodes.getNodeAs<DeclStmt>(DeclWithCastId)) {
453452
replaceExpr(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ auto hasWantedType(llvm::ArrayRef<StringRef> TypeNames) {
9898

9999
// Matches member call expressions of the named method on the listed container
100100
// types.
101-
auto cxxMemberCallExprOnContainer(
102-
StringRef MethodName, llvm::ArrayRef<StringRef> ContainerNames) {
101+
auto cxxMemberCallExprOnContainer(StringRef MethodName,
102+
llvm::ArrayRef<StringRef> ContainerNames) {
103103
return cxxMemberCallExpr(
104104
hasDeclaration(functionDecl(hasName(MethodName))),
105105
on(hasTypeOrPointeeType(hasWantedType(ContainerNames))));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- UseEqualsDefaultCheck.h - clang-tidy--------------------------*- C++ -*-===//
1+
//===--- UseEqualsDefaultCheck.h - clang-tidy---------------------*- C++-*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- UseEqualsDeleteCheck.h - clang-tidy---------------------------*- C++ -*-===//
1+
//===--- UseEqualsDeleteCheck.h - clang-tidy----------------------*- C++-*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class CastSequenceVisitor : public RecursiveASTVisitor<CastSequenceVisitor> {
229229
return true;
230230
}
231231

232-
auto* CastSubExpr = C->getSubExpr()->IgnoreParens();
232+
auto *CastSubExpr = C->getSubExpr()->IgnoreParens();
233233
// Ignore cast expressions which cast nullptr literal.
234234
if (isa<CXXNullPtrLiteralExpr>(CastSubExpr)) {
235235
return true;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ findReturnTypeAndCVSourceRange(const FunctionDecl &F, const TypeLoc &ReturnLoc,
316316
return {};
317317
}
318318

319-
320319
// If the return type has no local qualifiers, it's source range is accurate.
321320
if (!hasAnyNestedLocalQualifiers(F.getReturnType()))
322321
return ReturnTypeRange;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class UseTransparentFunctorsCheck : public ClangTidyCheck {
2626
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
2727
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
2828
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
29+
2930
private:
3031
const bool SafeMode;
3132
};

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ void UseUncaughtExceptionsCheck::registerMatchers(MatchFinder *Finder) {
3939
this);
4040
// CallExpr in initialisation list: warning, fix-it with avoiding narrowing
4141
// conversions.
42-
Finder->addMatcher(callExpr(DirectCallToUncaughtException,
43-
hasAncestor(initListExpr()))
44-
.bind("init_call_expr"),
45-
this);
42+
Finder->addMatcher(
43+
callExpr(DirectCallToUncaughtException, hasAncestor(initListExpr()))
44+
.bind("init_call_expr"),
45+
this);
4646
}
4747

4848
void UseUncaughtExceptionsCheck::check(const MatchFinder::MatchResult &Result) {

0 commit comments

Comments
 (0)