================
@@ -1113,5 +1116,20 @@ REGISTER_CHECKER(rand)
 REGISTER_CHECKER(vfork)
 REGISTER_CHECKER(FloatLoopCounter)
 REGISTER_CHECKER(UncheckedReturn)
-REGISTER_CHECKER(DeprecatedOrUnsafeBufferHandling)
+
+void ento::registerDeprecatedOrUnsafeBufferHandling(CheckerManager &mgr) {
+  SecuritySyntaxChecker *checker = mgr.getChecker<SecuritySyntaxChecker>();
+  checker->filter.check_DeprecatedOrUnsafeBufferHandling = true;
+  checker->filter.checkName_DeprecatedOrUnsafeBufferHandling =
+      mgr.getCurrentCheckerName();
+  checker->filter.allowDeprecatedOrUnsafeBufferHandlingWithoutC11 =
+      mgr.getAnalyzerOptions().getCheckerBooleanOption(
+          mgr.getCurrentCheckerName(), "ReportInC99AndEarlier");
----------------
steakhal wrote:

Looking at this, I feel like there is a mismatch in the name of the flag and 
the variable holing its value.
Namely: `ReportInC99AndEarlier` and 
`allowDeprecatedOrUnsafeBufferHandlingWithoutC11`

Do you think it would be better to have these share a common name?
I think that would make the code more relatable and searchable.
WDYT?

https://github.com/llvm/llvm-project/pull/168704
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to