<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I am working on some code generation tools that use lib clang.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">All my code is now c++11 based.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I was hoping to be able to access the class initializer nodes for member variables such as here:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">class Foo</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">{</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">  float x = 3.1415; // want to access the 3.1415 attached to the FieldDecl node for x</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">};</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I can’t seem to find anything in libclang that will allow that.</div><div><div class="bloop_container"><div class="bloop_frame">  </div></div></div><div><br></div>I believe the C++ method in clang that I want access to is <div><br></div><div><table class="memname" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;"><tbody><tr><td class="memname" style="font-size: 14.3999996185303px;"><a class="el" href="http://clang.llvm.org/doxygen/classclang_1_1Expr.html" style="color: rgb(61, 33, 133); text-decoration: none; font-weight: bold; cursor: pointer;">Expr</a>* <a class="el" href="http://clang.llvm.org/doxygen/classclang_1_1FieldDecl.html#a37514a3a67aa6c5e72f65d3fb77fae83" style="color: rgb(61, 33, 133); text-decoration: none; font-weight: bold; cursor: pointer;">clang::FieldDecl::getInClassInitializer</a></td><td style="font-size: 14.3999996185303px;">(</td><td class="paramname" style="font-size: 14.3999996185303px;"></td><td style="font-size: 14.3999996185303px;">)</td><td style="font-size: 14.3999996185303px;">const<code> </code></td></tr></tbody></table><div id="bloop_sign_1424793750806429952" class="bloop_sign"><br></div><div id="bloop_sign_1424793750806429952" class="bloop_sign">but do not see a way of getting that in libclang. Any way I can do this or is this just a limitation I cannot get around.</div><div id="bloop_sign_1424793750806429952" class="bloop_sign">Thanks, -Derek<div><br></div></div></div></body></html>