[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 14 11:13:52 PDT 2025


vbvictor wrote:

> > LGTM But there are still some violations left?
> 
> Yes, two more. Unfortunately, they require some refactoring as `llvm::yaml::IO` API uses C-strings only.

We can use a `// NOLINT(bugprone-suspicious-stringview-data-usage)` or `// NOLINTNEXTLINE(bugprone-suspicious-stringview-data-usage)` to suppress it for now, and enable this check in config.
Later `IO` class could be refactored.



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


More information about the cfe-commits mailing list