================
@@ -0,0 +1,840 @@
+//===--- UseExplicitNamespacesCheck.cpp - clang-tidy 
----------------------===//
+//
+// 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 "UseExplicitNamespacesCheck.h"
+#include "clang/AST/ASTContext.h"
+#include "clang/AST/ASTTypeTraits.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/ASTMatchers/ASTMatchers.h"
+#include "clang/Basic/TokenKinds.h"
+#include "clang/Lex/Lexer.h"
+#include <iomanip>
+#include <iostream>
+#include <sstream>
+
+using namespace clang::ast_matchers;
+
+namespace clang::tidy::readability {
+
+bool isTransparentNamespace(const NamespaceDecl *decl) {
+  return decl->isInline() || decl->isAnonymousNamespace();
+}
+
+std::string getIdentifierString(const IdentifierInfo *identifier) {
+  return (identifier) ? identifier->getNameStart() : "(nullptr)";
----------------
PiotrZSL wrote:

Use getName() and return StringRef instead of std::string

https://github.com/llvm/llvm-project/pull/70621
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to