<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks Richard,<br>
      <br>
      Question/comment inline.<br>
      <br>
      On 9/28/2016 11:50 AM, Richard Smith wrote:<br>
    </div>
    <blockquote
cite="mid:CAOfiQqkXQuG76bOQ46W711t_CgkjSGSSoxEXkiaNZdQQ1A4gnA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Wed, Sep 28, 2016 at 11:29 AM,
            Eric Bayer via cfe-dev <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:cfe-dev@lists.llvm.org" target="_blank">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">Oh, one
              follow on question... If I persist a MacroDefinition* or
              MacroInfo* in a datastructure, will this still exist when
              processing the AST tree or will these have been deleted
              out from under me?  Just trying to understand how much
              info I need to copy in a few cases.</blockquote>
            <div><br>
            </div>
            <div>MacroInfo, MacroDirective and ModuleMacro objects
              should persist until the Preprocessor object is destroyed.
              You can hold onto them until that happens.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    That had been my guess, unfortunately as I'm a plugin I am not
    creating that myself.  I guess my real question is then, at what
    stage is the default preprocessor object destroyed in the compiler.<br>
    <br>
    <blockquote
cite="mid:CAOfiQqkXQuG76bOQ46W711t_CgkjSGSSoxEXkiaNZdQQ1A4gnA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div>MacroDefinition has value semantics, so if you want to
              persist a MacroDefinition* it's up to you to store the
              MacroDefinition object somewhere. But you should probably
              just be passing it around by value.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Ohhh, gotcha!  Thanks for the tip.  <br>
    <br>
    <blockquote
cite="mid:CAOfiQqkXQuG76bOQ46W711t_CgkjSGSSoxEXkiaNZdQQ1A4gnA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
                class="HOEnZb"><font color="#888888"><br>
                     -Eric</font></span><span class="im HOEnZb"><br>
                <br>
                On 9/27/2016 6:59 PM, Eric Bayer wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  Hi Alex,<br>
                  <br>
                  Thanks again for all your help.  Actually I did manage
                  to make this eventually work with a huge amount of
                  Lexer/Token magic. Unfortunately I could not actually
                  follow it past 1 level, so it looks like an unworkable
                  solution for what I have in mind. I had thought the
                  macro definitons were expanded from other macros.
                  After digging though the SLocEntries, this is clearly
                  not the case and they are expanded at their final
                  uses.  This means I'm going back to the PPCallbacks
                  and digging in there.  I think I can get the whole
                  tree without annotating every macro I meet. Apparently
                  MacroExpands gets called repeatedly at the point the
                  macro gets used.<br>
                  <br>
                  Kind Regards,<br>
                     -Eric<br>
                </blockquote>
                <br>
              </span>
              <div class="HOEnZb">
                <div class="h5">
                  ______________________________<wbr>_________________<br>
                  cfe-dev mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
                  <a moz-do-not-send="true"
href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Ddev&d=CwMFaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=JUV4JPCePpFuWnRnH3TEko8ht33mtVYPAwDFFDOf8Jo&m=HHAYm6YF9BGgbzq3dgtAQ1syCDBHK4qIgwM7qGmi7h8&s=N9jDWZHCSPLEGmNFEfGk2XtEP9LRO-gGhCESFwWJmZ8&e="
                    rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>