================ @@ -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)"; +} + +std::string getMatchContext(const char *match, const DynTypedNode &node) { ---------------- PiotrZSL wrote:
use StringRef instead of "const char*" 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