[cfe-dev] Traces of SVal in BugReporterVisitor

gerardjubile shahar.golan.mail at gmail.com
Wed Feb 20 06:58:39 PST 2013

I am trying to write a new BugReporterVisitor to mark the traces of an SVal.
This BugReporterVisitor will be created an SVal usage causes a report, and
it needs to mark the traces of this SVAL.

In the following example, when checking the function call in line 5, I can
see that this is an allocation and by looking at the SVal of the argument, I
see that the allocation is of 0 bytes:

1  void *f(int i) {
2    int a = 0;
3    int b = a/i;
4    int c = b;
5    return malloc(c);
6  }

In the report for line 5 I would like to mark all the expressions that led
to the computation of the SVal.

My questions:
1. Can any of the existing BugReporterVisitor assist me?
2. If not, can anyone suggest guidelines to coding such a

Thanks, Gerard.

View this message in context: http://clang-developers.42468.n3.nabble.com/Traces-of-SVal-in-BugReporterVisitor-tp4030520.html
Sent from the Clang Developers mailing list archive at Nabble.com.

More information about the cfe-dev mailing list