MCPcopy Create free account
hub / github.com/csmith-project/csmith / make_random

Method make_random

src/Constant.cpp:399–405  ·  view source on GitHub ↗

-------------------------------------------------------------- * Sometimes we need to generate constants outside of any current function, * e.g., initializers for global variables */

Source from the content-addressed store, hash-verified

397 * e.g., initializers for global variables
398 */
399Constant *
400Constant::make_random(const Type* type)
401{
402 string v = GenerateRandomConstant(type);
403 ERROR_GUARD(NULL);
404 return new Constant(type, v);
405}
406
407Constant *
408Constant::make_random_upto(unsigned int limit)

Callers

nothing calls this directly

Calls 1

GenerateRandomConstantFunction · 0.85

Tested by

no test coverage detected