[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 7 07:19:18 PDT 2025
================
@@ -55,7 +55,8 @@ namespace clang::tidy {
namespace {
#if CLANG_TIDY_ENABLE_STATIC_ANALYZER
-static const char *AnalyzerCheckNamePrefix = "clang-analyzer-";
+static constexpr llvm::StringLiteral AnalyzerCheckNamePrefix =
----------------
localspook wrote:
I can't do that, it conflicts with:
https://github.com/llvm/llvm-project/blob/45d679218aebdac5c9818be211d8e3a517c944c3/clang/include/clang/AST/Expr.h#L1794-L1796
That's why I'm qualifying with the namespace everywhere.
https://github.com/llvm/llvm-project/pull/147301
More information about the cfe-commits
mailing list