<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20689">
<style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, 
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, 
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" 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;">Of course I might have sent this too soon. I see that what I’m actually dealing with is a DeclRefExpr node and not an ImplicitCast node. I’m not sure how to get the appropriate type information that I want from such a node.<br></div><div style="font-size: 13pt;" data-signatureblock="true"><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">-- <br>Aaron W. Hsu | arcfide@sacrideo.us | http://www.sacrideo.us<br>Please support my work: https://www.gratipay.com/arcfide/<br>לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃</div><div style="font-size: 13pt;"><br></div></div><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:arcfide@sacrideo.us" target="_parent">Aaron W.Hsu</a><br><b>Sent:</b> ‎Wednesday‎, ‎November‎ ‎26‎, ‎2014 ‎5‎:‎26‎ ‎PM<br><b>To:</b> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_parent">Clang Dev List</a></font></div></div><div><br></div><div dir="ltr">
<div style="font-size: 13pt;">Dear Clang Developers:</div><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">I’m trying to understand how QualType and Variable references work in the system. Basically, I want to make some changes to the way that ActOnBinOp works depending on the types of the LHSExpr and the RHSExpr values. In particular, I want to detect when one of these expressions has a qualifier that I’ve added called “Block Size” on the type. I’ve basically implemented it following the Address Space pattern, and I have verified that the type information does get added to some node at the handling of type attributes. However, the node that I get in the LHS of ActOnBinOp doesn’t have the expected type information. Here’s a small example:</div><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">int global(8) *p = …;</div><div style="font-size: 13pt;">p = p + 1;</div><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">In this case, I am dealing with “p + 1” and I expect the node representing “p” (LHSExpr) to be annotated with my new type attribute information. However, the node doesn’t have this. I dumped the AST and noticed that there is an ImplicitCast node wrapping an internal node. I suspect, but have not verified, that the type information is in the contained node, but that, for some reason, this type information isn’t being pushed up to the implicitcast. At this point, I’m running into my ignorance of how Clang does it’s AST parsing and handling, so I’m not sure of the correct way to deal with this to ensure that such expressions have the type information I want on them. </div><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">I would appreciate suggestions on how to properly move forward on this. <br></div><div style="font-size: 13pt;" data-signatureblock="true"><div style="font-size: 13pt;"><br></div><div style="font-size: 13pt;">-- <br>Aaron W. Hsu | arcfide@sacrideo.us | http://www.sacrideo.us<br>Please support my work: https://www.gratipay.com/arcfide/<br>לֵ֤ב חֲכָמִים֙ בְּבֵ֣ית אֵ֔בֶל וְלֵ֥ב כְּסִילִ֖ים בְּבֵ֥ית שִׂמְחָֽה׃</div><div style="font-size: 13pt;"><br></div></div>


</div></div>
</body>
</html>