<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Pardis,</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Take a look at Stmt::getStmtClass().<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">18.11.2018 21:20, Pardis Pashakhanloo
      via cfe-dev пишет:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMPUm_WxNesn88eTansGFbYdfCmfpZFiBki0aFO4QF2ravESpA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:tahoma,sans-serif;color:#444444">Hi all,<br>
        </div>
        <div dir="ltr">
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444"><br>
          </div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">Is it
            possible to get the kind of a Stmt object in clang?</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">The only
            solution that I know of is using dyn_cast. However, in this
            solution, I have to check for every kind of Stmt, e.g.</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">if
            (CompoundStmt *CS = dyn_cast<CompoundStmt>(d))</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">  ....</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">else if
            (IfStmt *IS = dyn_cast<IfStmt>(d))</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">  ....</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444"><br>
          </div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">Is there
            a better solution or trick?</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444"><br>
          </div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">Thanks,</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444">Pardis</div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444"><br>
          </div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444"><br>
          </div>
          <div class="gmail_default"
            style="font-family:tahoma,sans-serif;color:#444444"><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>