|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
Go to the source code of this file.
Functions | |
| std::optional< file_operations::tmp_file > | transform_nested_functions (const std::string &source_path) |
| Transforms GCC nested function definitions in a C source file into standard C by lambda-lifting them to file scope. | |
| std::optional< file_operations::tmp_file > transform_nested_functions | ( | const std::string & | source_path | ) |
Transforms GCC nested function definitions in a C source file into standard C by lambda-lifting them to file scope.
Captured variables from enclosing scopes become explicit pointer parameters (for direct calls) or file-scope static pointer variables (when the nested function is used as a function pointer).
Returns nullopt if no nested functions are detected (fast no-op). Otherwise returns a tmp_file whose path() contains the transformed source. The caller should pass that path to Clang instead of the original.