[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 8 05:07:57 PST 2024
================
@@ -2515,6 +2518,57 @@ void CStringChecker::evalSprintfCommon(CheckerContext &C, const CallEvent &Call,
C.addTransition(State);
}
+void CStringChecker::evalGetentropy(CheckerContext &C,
+ const CallEvent &Call, CharKind CK) const {
+ DestinationArgExpr Buffer = {{Call.getArgExpr(0), 0}};
+ SizeArgExpr Size = {{Call.getArgExpr(1), 1}};
+ ProgramStateRef State = C.getState();
+ const LocationContext *LCtx = C.getLocationContext();
+ SValBuilder &Builder = C.getSValBuilder();
----------------
steakhal wrote:
```suggestion
SValBuilder &SVB = C.getSValBuilder();
```
We usually call this `SVB`.
https://github.com/llvm/llvm-project/pull/83675
More information about the cfe-commits
mailing list