llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) <details> <summary>Changes</summary> clang-tidy complains that we should prefer static over the anonymous namespace, despite the API being static in addition to being in the anonymous namespace. We can silence the diagnostic by simply removing the namespace declaration. --- Full diff: https://github.com/llvm/llvm-project/pull/198071.diff 1 Files Affected: - (modified) clang-tools-extra/clang-doc/Serialize.cpp (-2) ``````````diff diff --git a/clang-tools-extra/clang-doc/Serialize.cpp b/clang-tools-extra/clang-doc/Serialize.cpp index f19b8da83e46b..b107af26cde27 100644 --- a/clang-tools-extra/clang-doc/Serialize.cpp +++ b/clang-tools-extra/clang-doc/Serialize.cpp @@ -26,7 +26,6 @@ namespace clang { namespace doc { namespace serialize { -namespace { static StringRef exprToString(const clang::Expr *E) { clang::LangOptions Opts; clang::PrintingPolicy Policy(Opts); @@ -35,7 +34,6 @@ static StringRef exprToString(const clang::Expr *E) { E->printPretty(OS, nullptr, Policy); return internString(Result); } -} // namespace SymbolID hashUSR(llvm::StringRef USR) { return llvm::SHA1::hash(arrayRefFromStringRef(USR)); `````````` </details> https://github.com/llvm/llvm-project/pull/198071 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
