[clang-tools-extra] [clang-tidy] Add user-defined functions to `bugprone-unsafe-functions` check (PR #106350)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 07:08:58 PDT 2024


================
@@ -127,57 +138,159 @@ static bool isAnnexKAvailable(std::optional<bool> &CacheVar, Preprocessor *PP,
   return CacheVar.value();
 }
 
+static std::vector<UnsafeFunctionsCheck::CheckedFunction>
+parseCheckedFunctions(StringRef Option, StringRef OptionName,
+                      ClangTidyContext *Context) {
+  std::vector<StringRef> Functions = utils::options::parseStringList(Option);
----------------
EugeneZelenko wrote:

```suggestion
  const std::vector<StringRef> Functions = utils::options::parseStringList(Option);
```

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


More information about the cfe-commits mailing list