1

I am developing a Clang static analyzer. In this analyzer, I need to iterate over the constraints in a RangedConstraintManager, but it seems this class is not public and I can't call its methods nor access its variables.

Is there any way to bypass this problem?

My current solution is to print the constraints using printJson method of ConstraintManager class and use its output to implement the logic of my analyzer in a program separated from Clang source code. However, it will be much better if I can implement the analyzer in Clang source code itself. (e.g. to later contribute to LLVM project)

1 Answer 1

0

You can try to use getConstraintMap(ProgramStateRef State) to get a Constraint Map with key SymbolRef and value RangeSet. So you could try iterate this map.

Not the answer you're looking for? Browse other questions tagged or ask your own question.