[cfe-dev] Reporting a bug found at EndPath at its correct location
YuvalShahar
yuval.shahar.007 at gmail.com
Mon Sep 16 07:31:59 PDT 2013
I am trying to solve a problem LIKE "unused variables": A symbol is assigned
a value and the value is never used.
For such a problem I need to track:
Assignments: mark LHS as "assigned a value".
Statements: for each symbol used in the expression, remove its "assigned a
value" property.
EndPath: report each symbol that is marked "assigned a value".
The problem is that the report appears at the end of the path and not at the
point of the assignment.
On attempting to solve this problem I tried:
Assignments: mark LHS as "assigned a value"; attach an ExplodedNode
marking the assignment location.
Statements: for each symbol used in the expression, remove its "assigned a
value" property.
EndPath: report each symbol that is marked "assigned a value", using the
previously attached ExplodedNode.
I would like to hear your opinions about these reporting scheme:
- Would this scheme work?
- Is it expensive in memory?
- Is there a preferred scheme?
Thanks.
--
View this message in context: http://clang-developers.42468.n3.nabble.com/Reporting-a-bug-found-at-EndPath-at-its-correct-location-tp4034472.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list