[clang-tools-extra] [NFC][clang-tidy] reword diagnostic note in definitions-in-headers (PR #106862)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 31 09:50:23 PDT 2024
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/106862
`make as inline` made little sense here, so I changed the `make` to `mark`
and added `the definition` as well.
>From 46704590d3a90518c7b58ce03ac29c3e65c26676 Mon Sep 17 00:00:00 2001
From: Julian Schmidt <git.julian.schmidt at gmail.com>
Date: Sat, 31 Aug 2024 18:44:37 +0200
Subject: [PATCH] [NFC][clang-tidy] reword diagnostic note in
definitions-in-headers
`make as inline` made little sense here, so I changed the `make` to `mark`
and added `the definition` as well.
---
clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp b/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
index 21008bc144b91a..ee869256898989 100644
--- a/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
@@ -102,7 +102,7 @@ void DefinitionsInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
// inline is not allowed for main function.
if (FD->isMain())
return;
- diag(FD->getLocation(), /*Description=*/"make as 'inline'",
+ diag(FD->getLocation(), "mark the definition as 'inline'",
DiagnosticIDs::Note)
<< FixItHint::CreateInsertion(FD->getInnerLocStart(), "inline ");
} else if (const auto *VD = dyn_cast<VarDecl>(ND)) {
More information about the cfe-commits
mailing list