<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />Hello Wei-Ren,<br><br>Thanks for your tips and could you give me some ideas about this question?<br><br>I think I need to make a new AST to describe C++/CX code, then convert each node in C++ AST of clang, using "RecursiveASTVisitor", to corresponding node of C++/CX's AST. If so, I think the key is how to build the AST of C++/CX.<br><br>What's your opinion?<br><br>Thank you.<br>Jeffrey.<br><br><br><div id="addMailSign"><span> </span></div><div style="background-color:#fff" id="mailcontent"><br><blockquote dir="ltr" style="border-left:2px solid #000000;margin-left:10px;margin-right:0px;padding-left:5px;padding-right:0px;font-family:宋体;font-style:normal;font-variant:normal;font-weight:normal;font-size: 9pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"><div style="font-family: 宋体; font-style: normal; font-variant: normal; font-weight: normal; font-size: 9pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- 原文 ----- </div><br><b>发件人:</b> <a hidefocus="true" xhref="mailto:chenwj@iis.sinica.edu.tw" mce_href="mailto:chenwj@iis.sinica.edu.tw">陳韋任 (Wei-Ren Chen)</a> <br><b>主 题:</b> Re: [LLVMdev] Is it possible to convert C++ code to C++/CX code via a plugin of clang?<br><b>时 间:</b> 2012年6月8日  11:13:44<br><b>抄 送:</b> <span title="llvmdev@cs.uiuc.edu">llvmdev</span>,  <span title="cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</span>,  <br><br><p><br>  CC'ed to clang ML. You can post clang question on clang ML. :-)<br><br>On Thu, Jun 07, 2012 at 06:23:15PM +0800, yangzhi0104@sohu.com wrote:<br>> Hello Guys,<br>> <br>> I am developing a plugin of clang and hope it can convert some C++ functions to<br>> C++/CX wrapper classes for WinRT system. If so, it would do a lot of work<br>> automatically.<br>> <br>> Now I have been somewhere. Using clang libraries, I could fetch the elements of<br>> C++ code for example, return type, function name, parameter list and others.<br>> Should I inherit "clang::Decl" to express C++/CX elements like Objective-C<br>> does?<br>> <br>> I think if I want to output C++/CX code using clang, I should inherit some<br>> classes in CodeGen. Should I do this? Or is it possible to be done in a plugin?<br>> <br>> Could you help me?<br>> <br>> Thank you,<br>> Jeffrey.<br>> <br><br><wbr>> __________________________<wbr>_____________________<br>> LLVM Developers mailing list<br>> LLVMdev@cs.uiuc.edu         http://llvm.cs.uiuc.edu<br>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<br><br><br>-- <br>Wei-Ren Chen (陳韋任)<br>Computer Systems Lab, Institute of Information Science,<br>Academia Sinica, Taiwan (R.O.C.)<br>Tel:886-2-2788-3799 #1667<br>Homepage: http://people.cs.nctu.edu.tw/~chenwj<br></p></blockquote></div>