[PATCH] D35670: [StaticAnalyzer] Handle LoopExit CFGElement in the analyzer

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 14 11:25:36 PDT 2017


dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.

Looks good to me! (Please expand the comment, though.)



================
Comment at: include/clang/Analysis/ProgramPoint.h:658
 
+class LoopExit : public ProgramPoint {
+public:
----------------
szepet wrote:
> dcoughlin wrote:
> > Can you add a comment explaining what meaning of this program point is.
> Can you help me with that? I am not sure what is important to say about this point to understand it better than from its name.
My recommendation would be to think about it from the perspective of someone new to the codebase trying to understand when the analyzer will reach such a program point. What additional context will they need that is not conveyed in the name alone?

At a minimum, I think it is worth mentioning that a LoopExit point can arise even when a loop is not entered and that not all loop exits will result in a LoopExit program point.


https://reviews.llvm.org/D35670





More information about the cfe-commits mailing list