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

via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 14 12:30:01 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
+      // updates to 'llvm::yaml::IO'
       IO.preflightKey(Option.first.data(), true, false, UseDefault, SaveInfo);
+      // NOLINTEND
----------------
capitan-davide wrote:

My bad, I mean to replace `NOLINTNEXTLINE` with `NOLINTBEGIN` since the comment wraps on the next line.

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


More information about the cfe-commits mailing list