NagyDonat wrote:

> I guess we could start doing extra verification in lambdas that we optionally 
> pass into the call description constructor: [...]

Hmm, perhaps that would be a bit more elegant than the status quo that we check 
the types in the handler functions like `evalMemset` (and return early if the 
type is nonstandard).

However, we often have multiple `CallDescription`s that handle very similar 
variants of the same function, so instead of the lambdas, we would probably 
often end up with referencing functions defined elsewhere to avoid code 
duplication – and then something like
```
       {{CDM::CLibraryMaybeHardened, {"memset"}, 3,
+       &CStringChecker::checkMemsetType
       },
       &CStringChecker::evalMemset},
```
isn't more appealing than the status quo :thinking: 

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

Reply via email to