summaryrefslogtreecommitdiffstats
path: root/clang-tidy/misc
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/misc')
-rw-r--r--clang-tidy/misc/DefinitionsInHeadersCheck.cpp7
-rw-r--r--clang-tidy/misc/DefinitionsInHeadersCheck.h9
-rw-r--r--clang-tidy/misc/MiscTidyModule.cpp7
-rw-r--r--clang-tidy/misc/MisplacedConstCheck.cpp7
-rw-r--r--clang-tidy/misc/MisplacedConstCheck.h9
-rw-r--r--clang-tidy/misc/NewDeleteOverloadsCheck.cpp7
-rw-r--r--clang-tidy/misc/NewDeleteOverloadsCheck.h9
-rw-r--r--clang-tidy/misc/NonCopyableObjects.cpp7
-rw-r--r--clang-tidy/misc/NonCopyableObjects.h9
-rw-r--r--clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp18
-rw-r--r--clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h9
-rw-r--r--clang-tidy/misc/RedundantExpressionCheck.cpp7
-rw-r--r--clang-tidy/misc/RedundantExpressionCheck.h9
-rw-r--r--clang-tidy/misc/StaticAssertCheck.cpp9
-rw-r--r--clang-tidy/misc/StaticAssertCheck.h9
-rw-r--r--clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp7
-rw-r--r--clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h9
-rw-r--r--clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp7
-rw-r--r--clang-tidy/misc/UnconventionalAssignOperatorCheck.h9
-rw-r--r--clang-tidy/misc/UniqueptrResetReleaseCheck.cpp7
-rw-r--r--clang-tidy/misc/UniqueptrResetReleaseCheck.h9
-rw-r--r--clang-tidy/misc/UnusedAliasDeclsCheck.cpp7
-rw-r--r--clang-tidy/misc/UnusedAliasDeclsCheck.h9
-rw-r--r--clang-tidy/misc/UnusedParametersCheck.cpp7
-rw-r--r--clang-tidy/misc/UnusedParametersCheck.h9
-rw-r--r--clang-tidy/misc/UnusedUsingDeclsCheck.cpp12
-rw-r--r--clang-tidy/misc/UnusedUsingDeclsCheck.h9
27 files changed, 105 insertions, 128 deletions
diff --git a/clang-tidy/misc/DefinitionsInHeadersCheck.cpp b/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
index f4dab397..a36f307b 100644
--- a/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
+++ b/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
@@ -1,9 +1,8 @@
//===--- DefinitionsInHeadersCheck.cpp - clang-tidy------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/DefinitionsInHeadersCheck.h b/clang-tidy/misc/DefinitionsInHeadersCheck.h
index 428b05cd..dda6d69e 100644
--- a/clang-tidy/misc/DefinitionsInHeadersCheck.h
+++ b/clang-tidy/misc/DefinitionsInHeadersCheck.h
@@ -1,16 +1,15 @@
//===--- DefinitionsInHeadersCheck.h - clang-tidy----------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_DEFINITIONS_IN_HEADERS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_DEFINITIONS_IN_HEADERS_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
#include "../utils/HeaderFileExtensionsUtils.h"
namespace clang {
diff --git a/clang-tidy/misc/MiscTidyModule.cpp b/clang-tidy/misc/MiscTidyModule.cpp
index dd9061a4..ba160d1d 100644
--- a/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tidy/misc/MiscTidyModule.cpp
@@ -1,9 +1,8 @@
//===--- MiscTidyModule.cpp - clang-tidy ----------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/MisplacedConstCheck.cpp b/clang-tidy/misc/MisplacedConstCheck.cpp
index 515b22c0..1e1b2b0d 100644
--- a/clang-tidy/misc/MisplacedConstCheck.cpp
+++ b/clang-tidy/misc/MisplacedConstCheck.cpp
@@ -1,9 +1,8 @@
//===--- MisplacedConstCheck.cpp - clang-tidy------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/MisplacedConstCheck.h b/clang-tidy/misc/MisplacedConstCheck.h
index 410edf7b..55803b40 100644
--- a/clang-tidy/misc/MisplacedConstCheck.h
+++ b/clang-tidy/misc/MisplacedConstCheck.h
@@ -1,16 +1,15 @@
//===--- MisplacedConstCheck.h - clang-tidy----------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISPLACED_CONST_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_MISPLACED_CONST_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/NewDeleteOverloadsCheck.cpp b/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
index 5e291195..a96d1904 100644
--- a/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
+++ b/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
@@ -1,9 +1,8 @@
//===--- NewDeleteOverloadsCheck.cpp - clang-tidy--------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/NewDeleteOverloadsCheck.h b/clang-tidy/misc/NewDeleteOverloadsCheck.h
index 3e99892b..cd23a746 100644
--- a/clang-tidy/misc/NewDeleteOverloadsCheck.h
+++ b/clang-tidy/misc/NewDeleteOverloadsCheck.h
@@ -1,16 +1,15 @@
//===--- NewDeleteOverloadsCheck.h - clang-tidy----------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NEWDELETEOVERLOADS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NEWDELETEOVERLOADS_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
#include "llvm/ADT/SmallVector.h"
#include <map>
diff --git a/clang-tidy/misc/NonCopyableObjects.cpp b/clang-tidy/misc/NonCopyableObjects.cpp
index de152754..53cc2734 100644
--- a/clang-tidy/misc/NonCopyableObjects.cpp
+++ b/clang-tidy/misc/NonCopyableObjects.cpp
@@ -1,9 +1,8 @@
//===--- NonCopyableObjects.cpp - clang-tidy-------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/NonCopyableObjects.h b/clang-tidy/misc/NonCopyableObjects.h
index 38a45fd5..6529fddf 100644
--- a/clang-tidy/misc/NonCopyableObjects.h
+++ b/clang-tidy/misc/NonCopyableObjects.h
@@ -1,16 +1,15 @@
//===--- NonCopyableObjects.h - clang-tidy-----------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NONCOPYABLEOBJECTS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NONCOPYABLEOBJECTS_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp b/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp
index c0bdbfbf..7f57fecd 100644
--- a/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp
+++ b/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp
@@ -1,9 +1,8 @@
//===--- NonPrivateMemberVariablesInClassesCheck.cpp - clang-tidy ---------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -23,8 +22,8 @@ AST_MATCHER(CXXRecordDecl, hasMethods) {
return std::distance(Node.method_begin(), Node.method_end()) != 0;
}
-AST_MATCHER(CXXRecordDecl, hasNonStaticMethod) {
- return hasMethod(unless(isStaticStorageClass()))
+AST_MATCHER(CXXRecordDecl, hasNonStaticNonImplicitMethod) {
+ return hasMethod(unless(anyOf(isStaticStorageClass(), isImplicit())))
.matches(Node, Finder, Builder);
}
@@ -67,10 +66,11 @@ void NonPrivateMemberVariablesInClassesCheck::registerMatchers(
IgnorePublicMemberVariables ? isProtected() : unless(isPrivate()));
// We only want the records that not only contain the mutable data (non-static
- // member variables), but also have some logic (non-static member functions).
- // We may optionally ignore records where all the member variables are public.
+ // member variables), but also have some logic (non-static, non-implicit
+ // member functions). We may optionally ignore records where all the member
+ // variables are public.
Finder->addMatcher(cxxRecordDecl(anyOf(isStruct(), isClass()), hasMethods(),
- hasNonStaticMethod(),
+ hasNonStaticNonImplicitMethod(),
unless(ShouldIgnoreRecord),
forEach(InterestingField.bind("field")))
.bind("record"),
diff --git a/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h b/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
index c39e356c..7bc44250 100644
--- a/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
+++ b/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.h
@@ -1,16 +1,15 @@
//===--- NonPrivateMemberVariablesInClassesCheck.h - clang-tidy -*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NONPRIVATEMEMBERVARIABLESINCLASSESCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NONPRIVATEMEMBERVARIABLESINCLASSESCHECK_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/RedundantExpressionCheck.cpp b/clang-tidy/misc/RedundantExpressionCheck.cpp
index e9b0f4d0..33a8b9a4 100644
--- a/clang-tidy/misc/RedundantExpressionCheck.cpp
+++ b/clang-tidy/misc/RedundantExpressionCheck.cpp
@@ -1,9 +1,8 @@
//===--- RedundantExpressionCheck.cpp - clang-tidy-------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/RedundantExpressionCheck.h b/clang-tidy/misc/RedundantExpressionCheck.h
index c0f8bf5e..d07e2b70 100644
--- a/clang-tidy/misc/RedundantExpressionCheck.h
+++ b/clang-tidy/misc/RedundantExpressionCheck.h
@@ -1,16 +1,15 @@
//===--- RedundantExpressionCheck.h - clang-tidy-----------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_REDUNDANT_EXPRESSION_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_REDUNDANT_EXPRESSION_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/StaticAssertCheck.cpp b/clang-tidy/misc/StaticAssertCheck.cpp
index 583ed7ad..a2f31797 100644
--- a/clang-tidy/misc/StaticAssertCheck.cpp
+++ b/clang-tidy/misc/StaticAssertCheck.cpp
@@ -1,9 +1,8 @@
//===--- StaticAssertCheck.cpp - clang-tidy -------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -146,7 +145,7 @@ SourceLocation StaticAssertCheck::getLastParenLoc(const ASTContext *ASTCtx,
const LangOptions &Opts = ASTCtx->getLangOpts();
const SourceManager &SM = ASTCtx->getSourceManager();
- llvm::MemoryBuffer *Buffer = SM.getBuffer(SM.getFileID(AssertLoc));
+ const llvm::MemoryBuffer *Buffer = SM.getBuffer(SM.getFileID(AssertLoc));
if (!Buffer)
return SourceLocation();
diff --git a/clang-tidy/misc/StaticAssertCheck.h b/clang-tidy/misc/StaticAssertCheck.h
index faefce17..b6d7211b 100644
--- a/clang-tidy/misc/StaticAssertCheck.h
+++ b/clang-tidy/misc/StaticAssertCheck.h
@@ -1,16 +1,15 @@
//===--- StaticAssertCheck.h - clang-tidy -----------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_STATICASSERTCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_STATICASSERTCHECK_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
#include "llvm/ADT/StringRef.h"
#include <string>
diff --git a/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp b/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
index 759c3f0e..b7077a12 100644
--- a/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
+++ b/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
@@ -1,9 +1,8 @@
//===--- ThrowByValueCatchByReferenceCheck.cpp - clang-tidy----------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h b/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
index a2e7df73..b3c89350 100644
--- a/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
+++ b/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
@@ -1,16 +1,15 @@
//===--- ThrowByValueCatchByReferenceCheck.h - clang-tidy--------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_THROW_BY_VALUE_CATCH_BY_REFERENCE_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp b/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp
index 84dd410d..8c87dae9 100644
--- a/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp
+++ b/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp
@@ -1,9 +1,8 @@
//===--- UnconventionalAssignOperatorCheck.cpp - clang-tidy -----*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/UnconventionalAssignOperatorCheck.h b/clang-tidy/misc/UnconventionalAssignOperatorCheck.h
index ee91dcaa..86e09388 100644
--- a/clang-tidy/misc/UnconventionalAssignOperatorCheck.h
+++ b/clang-tidy/misc/UnconventionalAssignOperatorCheck.h
@@ -1,16 +1,15 @@
//===--- UnconventionalAssignOperatorCheck.h - clang-tidy -------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_ASSIGNOPERATORSIGNATURECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_ASSIGNOPERATORSIGNATURECHECK_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp b/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
index 99758d33..9363fa90 100644
--- a/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
+++ b/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
@@ -1,9 +1,8 @@
//===--- UniqueptrResetReleaseCheck.cpp - clang-tidy ----------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/UniqueptrResetReleaseCheck.h b/clang-tidy/misc/UniqueptrResetReleaseCheck.h
index cf18a5a5..b302f156 100644
--- a/clang-tidy/misc/UniqueptrResetReleaseCheck.h
+++ b/clang-tidy/misc/UniqueptrResetReleaseCheck.h
@@ -1,16 +1,15 @@
//===--- UniqueptrResetReleaseCheck.h - clang-tidy --------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNIQUEPTRRESETRELEASECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNIQUEPTRRESETRELEASECHECK_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/UnusedAliasDeclsCheck.cpp b/clang-tidy/misc/UnusedAliasDeclsCheck.cpp
index 4beb4320..c301aeab 100644
--- a/clang-tidy/misc/UnusedAliasDeclsCheck.cpp
+++ b/clang-tidy/misc/UnusedAliasDeclsCheck.cpp
@@ -1,9 +1,8 @@
//===--- UnusedAliasDeclsCheck.cpp - clang-tidy----------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/UnusedAliasDeclsCheck.h b/clang-tidy/misc/UnusedAliasDeclsCheck.h
index 8cce3756..f25e8d8d 100644
--- a/clang-tidy/misc/UnusedAliasDeclsCheck.h
+++ b/clang-tidy/misc/UnusedAliasDeclsCheck.h
@@ -1,16 +1,15 @@
//===--- UnusedAliasDeclsCheck.h - clang-tidy--------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_ALIAS_DECLS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_ALIAS_DECLS_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseMap.h"
namespace clang {
diff --git a/clang-tidy/misc/UnusedParametersCheck.cpp b/clang-tidy/misc/UnusedParametersCheck.cpp
index cee09150..01dce8fa 100644
--- a/clang-tidy/misc/UnusedParametersCheck.cpp
+++ b/clang-tidy/misc/UnusedParametersCheck.cpp
@@ -1,9 +1,8 @@
//===--- UnusedParametersCheck.cpp - clang-tidy----------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
diff --git a/clang-tidy/misc/UnusedParametersCheck.h b/clang-tidy/misc/UnusedParametersCheck.h
index b9bae26f..7e9b8c96 100644
--- a/clang-tidy/misc/UnusedParametersCheck.h
+++ b/clang-tidy/misc/UnusedParametersCheck.h
@@ -1,16 +1,15 @@
//===--- UnusedParametersCheck.h - clang-tidy--------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_PARAMETERS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_PARAMETERS_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {
diff --git a/clang-tidy/misc/UnusedUsingDeclsCheck.cpp b/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
index 48009b5a..3dabca91 100644
--- a/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
+++ b/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
@@ -1,9 +1,8 @@
//===--- UnusedUsingDeclsCheck.cpp - clang-tidy----------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -155,7 +154,10 @@ void UnusedUsingDeclsCheck::onEndOfTranslationUnit() {
for (const auto &Context : Contexts) {
if (!Context.IsUsed) {
diag(Context.FoundUsingDecl->getLocation(), "using decl %0 is unused")
- << Context.FoundUsingDecl
+ << Context.FoundUsingDecl;
+ // Emit a fix and a fix description of the check;
+ diag(Context.FoundUsingDecl->getLocation(),
+ /*FixDescription=*/"remove the using", DiagnosticIDs::Note)
<< FixItHint::CreateRemoval(Context.UsingDeclRange);
}
}
diff --git a/clang-tidy/misc/UnusedUsingDeclsCheck.h b/clang-tidy/misc/UnusedUsingDeclsCheck.h
index 2a41a8f6..2e46f3c1 100644
--- a/clang-tidy/misc/UnusedUsingDeclsCheck.h
+++ b/clang-tidy/misc/UnusedUsingDeclsCheck.h
@@ -1,16 +1,15 @@
//===--- UnusedUsingDeclsCheck.h - clang-tidy--------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_UNUSED_USING_DECLS_H
-#include "../ClangTidy.h"
+#include "../ClangTidyCheck.h"
#include "llvm/ADT/SmallPtrSet.h"
#include <vector>