25 LegacyResourceProducers(Options.get(
26 "LegacyResourceProducers",
"::malloc;::aligned_alloc;::realloc;"
27 "::calloc;::fopen;::freopen;::tmpfile")),
28 LegacyResourceConsumers(Options.get(
29 "LegacyResourceConsumers",
"::free;::realloc;::freopen;::fclose")) {
32 return LangOpts.CPlusPlus11;
39 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
41 return TK_IgnoreUnlessSpelledInSource;
45 bool handleDeletion(
const ast_matchers::BoundNodes &Nodes);
46 bool handleLegacyConsumers(
const ast_matchers::BoundNodes &Nodes);
47 bool handleExpectedOwner(
const ast_matchers::BoundNodes &Nodes);
48 bool handleAssignmentAndInit(
const ast_matchers::BoundNodes &Nodes);
49 bool handleAssignmentFromNewOwner(
const ast_matchers::BoundNodes &Nodes);
50 bool handleReturnValues(
const ast_matchers::BoundNodes &Nodes);
51 bool handleOwnerMembers(
const ast_matchers::BoundNodes &Nodes);
56 const StringRef LegacyResourceProducers;
59 const StringRef LegacyResourceConsumers;
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.