Issue 129494
Summary Clang tidy warning modernize-use-std-print does not work on sample code from documentation
Labels clang
Assignees
Reporter belobrov-andrey
    The following minimal code sample from [documentation](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-print.html)

```
std::string getDescription(const std::string &description, int value)
{
 fprintf(stderr, "The %s is %3d\n", description.c_str(), value);

 return absl::StrFormat("The %s is %3d", description.c_str(), value);
}
```
There is no warning with suggestion to change fprintf to std::println.

Environment: Clang tidy 19, OS X, compile flags: -m64 -stdlib=libc++ -g -std=gnu++20 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to