[clang-tools-extra] [NFC][clang-tidy] reword diagnostic note in definitions-in-headers (PR #106862)

via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 31 09:50:50 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-tidy

Author: Julian Schmidt (5chmidti)

<details>
<summary>Changes</summary>

`make as inline` made little sense here, so I changed the `make` to `mark`
and added `the definition` as well.


---
Full diff: https://github.com/llvm/llvm-project/pull/106862.diff


1 Files Affected:

- (modified) clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp (+1-1) 


``````````diff
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)) {

``````````

</details>


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


More information about the cfe-commits mailing list