Issue 129484
Summary modernize-use-std-format clang tidy warning not working on example code from documentation
Labels clang
Assignees
Reporter belobrov-andrey
    After upgrading project to ะก++20 and enabling modernize-use-std-format warning there is modernize-use-std-format clang tidy warning:
Unable to use 'std::format' instead of 'StrFormat' because first argument is not a narrow string literal [modernize-use-std-format]
The minimal code sample to reproduce problem (sample from [documentation:](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-format.html)
```
#include <absl/strings/str_format.h>

#include <string>

std::string getDescription(const std::string& description, int value)
{
    return absl::StrFormat("The %s is %3d", description.c_str(), value);
}
```
Compile options: -g -stdlib=libc++ -std=c++20
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to