================
@@ -0,0 +1,172 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "ShadowedNamespaceFunctionCheck.h"
+#include "clang/AST/ASTContext.h"
+#include "clang/AST/Decl.h"
+#include "clang/AST/DeclCXX.h"
+#include "clang/AST/DynamicRecursiveASTVisitor.h"
+#include "clang/ASTMatchers/ASTMatchers.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SmallVector.h"
+
+using namespace clang::ast_matchers;
+
+namespace clang::tidy::misc {
+
+template <template <typename> typename ContainerTy>
+static auto makeCannonicalTypesRange(const ContainerTy<ParmVarDecl *> &C) {
+  return llvm::map_range(C, [](const ParmVarDecl *Param) {
+    return Param->getType().getCanonicalType();
+  });
+}
+
+static bool hasSameSignature(const FunctionDecl *Func1,
+                             const FunctionDecl *Func2) {
+  if (Func1->param_size() != Func2->param_size())
+    return false;
+
+  if (Func1->getReturnType().getCanonicalType() !=
+      Func2->getReturnType().getCanonicalType())
+    return false;
+
+  return llvm::equal(makeCannonicalTypesRange(Func1->parameters()),
+                     makeCannonicalTypesRange(Func2->parameters()));
+}
+
+static bool sholdBeIgnored(const FunctionDecl *Func, bool IgnoreTemplated) {
----------------
zwuis wrote:

Typo. "shold"

https://github.com/llvm/llvm-project/pull/168406
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to