Skip to content

Commit 536ef18

Browse files
authored
Merge branch 'main' into fix-google-readability-casting
2 parents 43d9db4 + a805147 commit 536ef18

File tree

176 files changed

+3919
-1760
lines changed

Some content is hidden

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

176 files changed

+3919
-1760
lines changed

clang-tools-extra/clang-tidy/.clang-tidy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Checks: >
99
-bugprone-narrowing-conversions,
1010
-bugprone-unchecked-optional-access,
1111
-bugprone-unused-return-value,
12+
cppcoreguidelines-init-variables,
13+
cppcoreguidelines-missing-std-forward,
14+
cppcoreguidelines-rvalue-reference-param-not-moved,
15+
cppcoreguidelines-virtual-class-destructor,
1216
google-readability-casting,
1317
misc-const-correctness,
1418
modernize-*,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "clang/Basic/SourceManager.h"
2020
#include "clang/Tooling/Core/Diagnostic.h"
2121
#include "llvm/ADT/STLExtras.h"
22-
#include "llvm/ADT/SmallVector.h"
2322
#include "llvm/ADT/StringExtras.h"
2423
#include "llvm/ADT/StringMap.h"
2524
#include "llvm/ADT/StringSwitch.h"

clang-tools-extra/clang-tidy/bugprone/ChainedComparisonCheck.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "clang/ASTMatchers/ASTMatchFinder.h"
1212
#include "llvm/ADT/SmallString.h"
1313
#include "llvm/ADT/SmallVector.h"
14-
#include <algorithm>
1514

1615
using namespace clang::ast_matchers;
1716

clang-tools-extra/clang-tidy/bugprone/DanglingHandleCheck.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "DanglingHandleCheck.h"
10-
#include "../utils/Matchers.h"
1110
#include "../utils/OptionsUtils.h"
1211
#include "clang/AST/ASTContext.h"
1312
#include "clang/ASTMatchers/ASTMatchFinder.h"
1413

1514
using namespace clang::ast_matchers;
16-
using namespace clang::tidy::matchers;
1715

1816
namespace clang::tidy::bugprone {
1917

clang-tools-extra/clang-tidy/bugprone/NonZeroEnumToBoolConversionCheck.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "../utils/OptionsUtils.h"
1212
#include "clang/AST/ASTContext.h"
1313
#include "clang/ASTMatchers/ASTMatchFinder.h"
14-
#include <algorithm>
1514

1615
using namespace clang::ast_matchers;
1716

clang-tools-extra/clang-tidy/bugprone/UnsafeFunctionsCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ void UnsafeFunctionsCheck::registerMatchers(MatchFinder *Finder) {
266266
}
267267

268268
void UnsafeFunctionsCheck::check(const MatchFinder::MatchResult &Result) {
269-
const Expr *SourceExpr;
270-
const FunctionDecl *FuncDecl;
269+
const Expr *SourceExpr = nullptr;
270+
const FunctionDecl *FuncDecl = nullptr;
271271

272272
if (const auto *DeclRef = Result.Nodes.getNodeAs<DeclRefExpr>(DeclRefId)) {
273273
SourceExpr = DeclRef;

clang-tools-extra/clang-tidy/llvm/UseNewMLIROpBuilderCheck.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "clang/Lex/Lexer.h"
1313
#include "clang/Tooling/Transformer/RangeSelector.h"
1414
#include "clang/Tooling/Transformer/RewriteRule.h"
15-
#include "clang/Tooling/Transformer/SourceCode.h"
1615
#include "clang/Tooling/Transformer/Stencil.h"
1716
#include "llvm/Support/Error.h"
1817
#include "llvm/Support/FormatVariadic.h"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "MakeSmartPtrCheck.h"
910
#include "../utils/TypeTraits.h"
10-
#include "MakeSharedCheck.h"
1111
#include "clang/Frontend/CompilerInstance.h"
1212
#include "clang/Lex/Lexer.h"
1313
#include "clang/Lex/Preprocessor.h"

clang-tools-extra/clang-tidy/readability/RedundantInlineSpecifierCheck.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
#include "clang/Basic/Diagnostic.h"
1717
#include "clang/Basic/SourceLocation.h"
1818
#include "clang/Basic/SourceManager.h"
19+
#include "clang/Lex/Lexer.h"
1920
#include "clang/Lex/Token.h"
2021

21-
#include "../utils/LexerUtils.h"
22-
2322
using namespace clang::ast_matchers;
2423

2524
namespace clang::tidy::readability {

clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "RedundantStringInitCheck.h"
10-
#include "../utils/Matchers.h"
1110
#include "../utils/OptionsUtils.h"
1211
#include "clang/ASTMatchers/ASTMatchers.h"
1312
#include <optional>
1413

1514
using namespace clang::ast_matchers;
16-
using namespace clang::tidy::matchers;
1715

1816
namespace clang::tidy::readability {
1917

0 commit comments

Comments
 (0)