<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Alex thanks for your hint.</p>
    <p>I was playing around with getTypeLoc, but I am didn't find a way
      to get the location of the opening parenthesis of a function
      argument list.</p>
    <p>Maybe you have an idea?<br>
    </p>
    <p>Marcel<br>
    </p>
    Am 30.07.2017 um 21:56 schrieb Alex L:<br>
    <blockquote type="cite"
cite="mid:CAKS3GBtcR9Eiss3rHuJUUp0CjdiFaHSNsJb9QUj8vzs-np9w0g@mail.gmail.com">
      <div dir="ltr">
        <div>Hi Marcel,<br>
        </div>
        <div><br>
        </div>
        <div>I believe that you can get the location of '('/')' and
          insert a new parameter after/before that location. The
          locations of braces should be in the FunctionTypeLoc which you
          can extract from the TypeLoc value returned by calling
          ((FunctionDecl *)YourFunction)-><span
            style="color:rgb(0,0,0)">getTypeSourceInfo-></span><span
            style="color:rgb(0,0,0)">getTypeLoc</span><span
            style="color:rgb(0,0,0)">();</span></div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Alex</div>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On 30 July 2017 at 16:44, Marcel
            Schaible via cfe-dev <span dir="ltr"><<a
                href="mailto:cfe-dev@lists.llvm.org" target="_blank"
                moz-do-not-send="true">cfe-dev@lists.llvm.org</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
              everyone,<br>
              <br>
              I am trying to transform function arguments. For functions
              with a at least one argument I can position the Rewriter
              on the paramdecl.<br>
              <br>
              But if the function has no arguments there is no
              paramdecl. So how can I rewrite the argument list of such
              a function?<br>
              <br>
              Example:<br>
              <br>
              int foo() { return 42; } transform into int foo(int p1) {
              return 42;);<br>
              <br>
              Thanks<br>
              <br>
              Marcel<br>
              <br>
              ______________________________<wbr>_________________<br>
              cfe-dev mailing list<br>
              <a href="mailto:cfe-dev@lists.llvm.org" target="_blank"
                moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br>
              <a
                href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
                rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>