[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
Mon Sep 15 13:54:10 PDT 2025
================
@@ -99,7 +99,10 @@ void yamlize(IO &IO, ClangTidyOptions::OptionMap &Val, bool,
for (auto &Option : SortedOptions) {
bool UseDefault = false;
void *SaveInfo = nullptr;
+ // NOLINTBEGIN(bugprone-suspicious-stringview-data-usage): Requires
+ // 'llvm::yaml::IO' to accept 'StringRef'
----------------
vbvictor wrote:
It's better to write:
```cpp
// Requires 'llvm::yaml::IO' to accept 'StringRef'
// NOLINTNEXTLINE(bugprone-suspicious-stringview-data-usage)
```
without trailing `// NOLINTEND`
Same for other place.
https://github.com/llvm/llvm-project/pull/158480
More information about the cfe-commits
mailing list