Skip to content

Commit f074fd0

Browse files
authored
Merge branch 'main' into add-uniqueptr-to-unsafe-buffer-usage
2 parents aacc510 + 7fbfd1c commit f074fd0

File tree

179 files changed

+4576
-1694
lines changed

Some content is hidden

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

179 files changed

+4576
-1694
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Checks: >
1111
modernize-*,
1212
-modernize-avoid-c-arrays,
1313
-modernize-pass-by-value,
14-
-modernize-use-auto,
1514
-modernize-use-nodiscard,
1615
-modernize-use-trailing-return-type,
1716
performance-*,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ void UseIntegerSignComparisonCheck::check(
138138
return;
139139
const Expr *SubExprLHS = nullptr;
140140
const Expr *SubExprRHS = nullptr;
141-
SourceRange R1 = SourceRange(LHS->getBeginLoc());
142-
SourceRange R2 = SourceRange(BinaryOp->getOperatorLoc());
143-
SourceRange R3 = SourceRange(Lexer::getLocForEndOfToken(
141+
SourceRange R1(LHS->getBeginLoc());
142+
SourceRange R2(BinaryOp->getOperatorLoc());
143+
SourceRange R3(Lexer::getLocForEndOfToken(
144144
RHS->getEndLoc(), 0, *Result.SourceManager, getLangOpts()));
145145
if (const auto *LHSCast = llvm::dyn_cast<ExplicitCastExpr>(LHS)) {
146146
SubExprLHS = LHSCast->getSubExpr();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static SourceRange getLockGuardRange(const TypeSourceInfo *SourceInfo) {
9898

9999
// Find the exact source range of the 'lock_guard' name token
100100
static SourceRange getLockGuardNameRange(const TypeSourceInfo *SourceInfo) {
101-
const TemplateSpecializationTypeLoc TemplateLoc =
101+
const auto TemplateLoc =
102102
SourceInfo->getTypeLoc().getAs<TemplateSpecializationTypeLoc>();
103103
if (!TemplateLoc)
104104
return {};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static bool maxCondition(const BinaryOperator::Opcode Op, const Expr *CondLhs,
6262
static QualType getNonTemplateAlias(QualType QT) {
6363
while (true) {
6464
// cast to a TypedefType
65-
if (const TypedefType *TT = dyn_cast<TypedefType>(QT)) {
65+
if (const auto *TT = dyn_cast<TypedefType>(QT)) {
6666
// check if the typedef is a template and if it is dependent
6767
if (!TT->getDecl()->getDescribedTemplate() &&
6868
!TT->getDecl()->getDeclContext()->isDependentContext())

clang-tools-extra/test/clang-include-fixer/multiple_fixes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: shell
21
// RUN: sed -e 's#//.*$##' %s > %t.cpp
32
// RUN: mkdir -p %t.dir/clang-include-fixer/multiple-fixes
43
// RUN: echo 'foo f;' > %t.dir/clang-include-fixer/multiple-fixes/foo.cpp

clang-tools-extra/test/clang-tidy/infrastructure/clang-tidy-diff.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: shell
1+
// UNSUPPORTED: system-windows
22
// RUN: sed 's/placeholder_for_f/f/' %s > %t.cpp
33
// RUN: clang-tidy -checks=-*,modernize-use-override %t.cpp -- -std=c++11 | FileCheck -check-prefix=CHECK-SANITY %s
44
// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-*,modernize-use-override -- -std=c++11 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-JMAX

clang-tools-extra/test/clang-tidy/infrastructure/file-filter-symlinks.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// REQUIRES: shell
2-
31
// RUN: rm -rf %t
42
// RUN: mkdir -p %t/dir1/dir2
53
// RUN: echo 'class A { A(int); };' > %t/dir1/header.h

clang-tools-extra/test/clang-tidy/infrastructure/header-filter-from-config-file/inheritance/subfolder/bar.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// shell is required for the "dirname" command
2-
// REQUIRES: shell
3-
// RUN: clang-tidy -checks=-*,google-explicit-constructor %s -- -I "$(dirname %S)" 2>&1 | FileCheck %s
1+
// UNSUPPORTED: system-windows
2+
// RUN: pushd %S
3+
// RUN: cd ..
4+
// RUN: clang-tidy -checks=-*,google-explicit-constructor %s -- -I "." 2>&1 | FileCheck %s
5+
// RUN: popd
46
#include "foo.h"
57
// CHECK-NOT: foo.h:1:12: warning: single-argument constructors must be marked explicit
68

clang-tools-extra/test/clang-tidy/infrastructure/pr37091.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: shell
21
// RUN: rm -rf %t
32
// RUN: mkdir -p %t
43

clang-tools-extra/test/clang-tidy/infrastructure/vfsoverlay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
// UNSUPPORTED: system-windows
12
// RUN: sed -e "s:INPUT_DIR:%S/Inputs/vfsoverlay:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay/vfsoverlay.yaml > %t.yaml
23
// RUN: clang-tidy %s -checks='-*,modernize-use-nullptr' -vfsoverlay %t.yaml -- -I %t | FileCheck %s
3-
// REQUIRES: shell
44

55
#include "not_real.h"
66

0 commit comments

Comments
 (0)