<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>You can compare both the beginning and the end of the
      SourceRange. SourceLocations itself are comparable.</p>
    <p>With this you can build a small helper function to the inclusion
      check.<br>
    </p>
    <p>Best, Jonas<br>
    </p>
    <div class="moz-cite-prefix">Am 27.11.18 um 18:52 schrieb Pardis
      Pashakhanloo via cfe-dev:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMPUm_V=4OBY+h3xidLYzeW=tVWPRmhg4eVfP==_ChvVkY71FA@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,</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">How can I
          check if a SourceRange is inside another SourceRange?</div>
        <div class="gmail_default"
          style="font-family:tahoma,sans-serif;color:#444444">For
          example, if I have a FunctionDecl *FD and a Stmt *S, how to
          check if S->getSourceRange() is located inside
          FD->getSourceRange()?</div>
        <div class="gmail_default"
          style="font-family:tahoma,sans-serif;color:#444444"><br>
        </div>
        <div>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">Best,
              <div>Pardis</div>
            </div>
          </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>
  </body>
</html>