TBD: Static code analysis improvement

I just read about the static code analysis feature that Apple has just added to XCode for Snow Leopard. Well, I thought: "Been there, done that, got the T-Shirt"!

But then, I saw this:
http://iphonedevelopertips.com/xcode/static-code-analysis-clang-and-xcode-3-2.html

I am specifically referring to the image where XCode actually shows the control flow with little arrows. Wouldn't it be nice to have an intention "Show control flow" for inspections like "Variable xyz might not have been initialized"?

What do you guys think?
Dirk

3 comments
Comment actions Permalink

I saw the same article as you and thought the same thing! I was going to
post here about it but got sidetracked and forgot about it so I'm glad you
brought it up. Certainly is a great feature, and I imagine something that
can be expanded on in various ways. eg pressing a shortcut key could show
the different possible code paths through branch statements, with different
colours for true/false etc.

DD> I just read about the static code analysis feature that Apple has
DD> just added to XCode for Snow Leopard. Well, I thought: "Been there,
DD> done that, got the T-Shirt"!
DD>
DD> But then, I saw this:
DD> http://iphonedevelopertips.com/xcode/static-code-analysis-clang-and-
DD> xcode-3-2.html
DD> I am specifically referring to the image where XCode +actually
DD> shows+ the control flow with little arrows. Wouldn't it be nice to
DD> have an intention "Show control flow" for inspections like "Variable
DD> xyz might not have been initialized"?
DD>
DD> What do you guys think?
DD> Dirk


0
Comment actions Permalink

While not related to visualization, IDEA has a "Show data flow to this"
feature. It's not limited to the scope of a method though :)

It works across the whole source code base, and can be extremely useful.
In addition, the feature has been greatly extended in Maia (thanks,
Alexey!). IDEA 9.0 (Maia) can show dataflow in both directions, and
provide grouping by edge node expression as well.

Take a look at this IDEA blog entry for more information:
http://blogs.jetbrains.com/idea/2009/08/analyzing-dataflow-with-intellij-idea/

-tt

0
Comment actions Permalink

I do know "Dataflow to this". I believe, it's one of the coolest and most powerful features of IDEA. The improvements that I was talking about would have a very limited scope (e.g. the current method only).

0

Please sign in to leave a comment.