[cfe-dev] Getting Stmt's parent, striping a QualType from CVR Qualifiers, eclipse & llvm
Ilya Mirsky
ilya.mirsky at gmail.com
Thu Aug 26 06:53:54 PDT 2010
Hi clang developers,
First, I would like to thank Douglas Gregor, who consistently helps and
answers questions. I learn a lot from his replies, so Doug, I really
appreciate it!
I'm working on a program that does a src-2-src transformations, and I have
the following issues:
1. For some Stmt, how can I get its parent Stmt. i.e. when Replacing a
Stmt which forms an IF body, sometimes it requires placing the new code
inside brackets (replacement of a single Stmt with a block of Stmts), or if
I'm replacing a Stmt which is part of a compound expression I want to get
the location of the semicolon, in order to insert some code right afterward.
How can I achieve this?
2. Calling ParmVarDecl::getType::getAsString on the src code "const char
*str" returns "TODO".
How can I get just the "char*", without the const?
I've tried to apply QualType::removeConst, QualType::removeCVRQualifiers
but none seems to do any change.
What is the right way to get the stripped type, without the CVR
Qualifiers?
3. Currently I'm working on VS, but I want to switch to eclipse (minGW),
unfortunately I'm having problems with llvm in eclipse. I run cmake with
eclipse CDT configuration, but when I try to compile in eclipse I get
errors. When I try to link an llvm client to existing llvm libraries (built
with VS) I also get multiple compilation errors (the include lib is
specified).
My assumption is that minGW is more strict than VS. Is this really the
problem, or am I missing something?
Can anybody help me work it out?
Thanks in advance,
Ilya
--
Best Regards,
Ilya Mirsky
www.cs.bgu.ac.il/~mirskyil <http://www.cs.bgu.ac.il/%7Emirskyil>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100826/3ef8c718/attachment.html>
More information about the cfe-dev
mailing list