<div dir="ltr">Where is this function name coming from? Is it some kind of built-in?<div><br></div><div>You should be able to construct DeclarationName from IdentifierInfo. Call PP.getIdentiferInfo inside Sema to get the identifier.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 2, 2014 at 1:03 PM, Aaron W.Hsu <span dir="ltr"><<a href="mailto:arcfide@sacrideo.us" target="_blank">arcfide@sacrideo.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div dir="ltr" style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt"><div style="font-size:13pt">Dear Nikola:</div><div style="font-size:13pt"><br></div><div style="font-size:13pt">Thanks for the introduction to LookupName() and LookupResult. I think this is exactly what I want, especially LookupSingleName(). However, I seem to require a DeclarationName, which I don’t have yet. I’m not sure how to get one. I just have a string which is the name of the function I wish to lookup (this is in C), and I don’t know how to get from there to a DeclarationName and the other information I need. <br></div><span class=""><div style="font-size:13pt"><div style="font-size:13pt"><br></div><div style="font-size:13pt">-- <br>Aaron W. Hsu | <a href="mailto:arcfide@sacrideo.us" target="_blank">arcfide@sacrideo.us</a> | <a href="http://www.sacrideo.us" target="_blank">http://www.sacrideo.us</a><br>Please support my work: <a href="https://www.gratipay.com/arcfide/" target="_blank">https://www.gratipay.com/arcfide/</a><br>לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃</div><div style="font-size:13pt"><br></div></div></span><div style="padding-top:5px;border-top-color:rgb(229,229,229);border-top-width:1px;border-top-style:solid"><div><font face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'" style="line-height:15pt;letter-spacing:0.02em;font-family:"Calibri","Segoe UI","Meiryo","Microsoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic","sans-serif";font-size:12pt"><b>From:</b> <a href="mailto:popizdeh@gmail.com" target="_blank">Nikola Smiljanic</a><br><b>Sent:</b> ‎Monday‎, ‎December‎ ‎1‎, ‎2014 ‎6‎:‎19‎ ‎PM<br><b>To:</b> <a href="mailto:arcfide@sacrideo.us" target="_blank">Aaron W.Hsu</a><br><b>Cc:</b> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">Clang Dev List</a></font></div></div><div><div class="h5"><div><br></div><div dir=""><div dir="ltr">Create LookupResult and call LookupName on it passing appropriate DeclarationContext into which you're performing the lookup (can be a scope or record decl).</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 2, 2014 at 10:00 AM, Aaron W.Hsu <span dir="ltr"><<a href="mailto:arcfide@sacrideo.us" target="_blank">arcfide@sacrideo.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">




<div dir="ltr">
<div style="font-family:"Calibri","Segoe UI","Meiryo","Microsoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic","sans-serif";font-size:12pt" dir="ltr"><div style="font-size:13pt">Dear Clang Developers:</div><div style="font-size:13pt"><br></div><div style="font-size:13pt">Inside of SemaExpr.cpp when handling BinOps, I want to lookup the (Expr *) and (NamedDecl) of a function by its name. How can I do this?</div><div style="font-size:13pt"><br></div><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px" dir="ltr"><div style="font-size:13pt">Yours truly,</div><div style="font-size:13pt"><br></div><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px" dir="ltr"><div style="font-size:13pt">Aaron W. Hsu<span><font color="#888888"><br></font></span></div></blockquote></blockquote><span><font color="#888888"><div style="font-size:13pt"><br></div><div style="font-size:13pt">-- <br>Aaron W. Hsu | <a href="mailto:arcfide@sacrideo.us" target="_blank">arcfide@sacrideo.us</a> | <a href="http://www.sacrideo.us" target="_blank">http://www.sacrideo.us</a><br>Please support my work: <a href="https://www.gratipay.com/arcfide/" target="_blank">https://www.gratipay.com/arcfide/</a><br>לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃</div><div style="font-size:13pt"><br></div></font></span></div>
</div>

<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</div></div></div></div>
</div>

</blockquote></div><br></div>