<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    On 9/22/2011 5:22 PM, Ted Kremenek wrote:
    <blockquote
      cite="mid:B913F671-F902-435A-8B5C-6E97666680A0@apple.com"
      type="cite"><br>
      <div>
        <div>On Sep 22, 2011, at 5:03 PM, Jim Goodnow II wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite"><span class="Apple-style-span"
            style="border-collapse: separate; font-family: Helvetica;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
            -webkit-border-vertical-spacing: 0px;
            -webkit-text-decorations-in-effect: none;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; font-size: medium; ">Just curious. Is there any reason
            that CXXForRangeStmtClass isn't treated the same as
            ForStmtClass in ExprEngine?</span></blockquote>
        <div><br>
        </div>
        <div>They shouldn't be treated the same because they aren't the
          same semantically.  In the AST their common ancestor is Stmt;
          they need to be handled separately.</div>
        <br>
        <blockquote type="cite"><span class="Apple-style-span"
            style="border-collapse: separate; font-family: Helvetica;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
            -webkit-border-vertical-spacing: 0px;
            -webkit-text-decorations-in-effect: none;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; font-size: medium; "> It shouldn't appear explicitly in
            the CFG since it is already handled by the semantic engine.</span></blockquote>
        <br>
      </div>
      <div>The CFG is suppose to represent all control-flow, including
        this statement.  What do you mean by the "semantic engine"?</div>
      <br>
    </blockquote>
    Yes, it is true that they are not the same semantically, but when
    the AST is generated, the semantics of the ForRange and For are
    replaced with the appropriate statements that implement the
    semantics by initializing, incrementing, comparing and branching.
    So, the CFG does model both statement types with other explicit
    statements which is why the For never appears explicitly in the CFG.
    The same should hold true for the ForRange. I'm just suggesting that
    the CXXForRangeStmtClass case be moved from the 'unsupported' part
    of the switch to the section with For, Break, Continue, etc. Now,
    the ObjectiveC ForCollection statement may be handled differently
    which may require it to be explicitly handled in the CFG and in the
    analyzer.<br>
    <br>
  </body>
</html>