[clang-tools-extra] [clang-tidy][NFC] Prefer `constexpr llvm::StringLiteral` over `const char *` (PR #147301)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 7 07:05:44 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 =
----------------
vbvictor wrote:

```suggestion
static constexpr StringLiteral AnalyzerCheckNamePrefix =
```
We have `using namespace llvm;` in line 50.

https://github.com/llvm/llvm-project/pull/147301


More information about the cfe-commits mailing list