Description
This issue was copied from checkedc/checkedc-clang#609
The checked c type checker seems to add some bounds information to certain elements of AST. For example: ArraySubscriptExpr
.
Refer: https://github.com/microsoft/checkedc-clang/blob/master/lib/Sema/SemaBounds.cpp#L1620
This changes the AST and makes Sema non-reentrant.
For instance, If I want to invoke CheckedC type-checker (i.e., Sema) in a loop on the same function body, specifically, the method:
ActOnFinishFunctionBody(...);
It asserts out at: https://github.com/microsoft/checkedc-clang/blob/master/lib/Sema/SemaBounds.cpp#L1619
Because it already added bounds information to the expression.
To avoid this, I can remove whatever changes the type-checker had made to the AST. This way Sema doesn't assert out. Do you have any information on changes that could be done by the Checked C type checker? I see only bounds information being added to certain expression. Is this valid or there are more changes made by the type checker?