================
@@ -91,6 +92,13 @@ void FasterStringFindCheck::check(const 
MatchFinder::MatchResult &Result) {
                                "efficient overload accepting a character")
       << FindFunc
       << FixItHint::CreateReplacement(Literal->getSourceRange(), *Replacement);
+
+  if (getID() == "performance-faster-string-find")
+    diag(Literal->getBeginLoc(),
+         "performance-faster-string-find is deprecated and will be removed in "
+         "future release, consider using "
+         "performance-prefer-single-char-overloads",
+         DiagnosticIDs::Note);
----------------
localspook wrote:

Having a reusable check deprecation mechanism sounds like a great approach. I'm 
kinda surprised we don't already have one. I guess we don't deprecate checks 
that often, so it hasn't come up before?

> My current thought is to remove the notes in this PR for now, and add them 
> back after we finish the helper in ClangTidyDiagnosticConsumer. WDYT?

When you say this, do you mean merge this PR without the note and add it later, 
or block this PR until the helper is implemented? (I'm fine either way, just 
want to confirm)

https://github.com/llvm/llvm-project/pull/186946
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to