<div dir="ltr"><div>Hi, </div><div><br></div><div>the documentation [1] says:</div><div><br></div><div><div>template<typename T > const T* clang::ast_type_traits::DynTypedNode::get<span class="" style="white-space:pre"> </span></div></div><br clear="all"><div>For types that have identity via their pointer in the AST (like Stmt, Decl, Type and NestedNameSpecifier) the returned pointer points to the referenced AST node. For other types (like QualType) the value is stored directly in the DynTypedNode, and the returned pointer points at the storage inside DynTypedNode. For those nodes, do not use the pointer outside the scope of the DynTypedNode.<br></div><div><br></div><div>However making a copy of the QualType object for using it "outside" of the scope of the DynTypeNode, should be safe, or? I need it for a C interface like libclang.<br></div><div><br></div><div><br></div><div>[1] <a href="http://clang.llvm.org/doxygen/classclang_1_1ast__type__traits_1_1DynTypedNode.html">http://clang.llvm.org/doxygen/classclang_1_1ast__type__traits_1_1DynTypedNode.html</a> <br></div><br><div class="gmail_signature">rgrds,<br>mobi phil<br><br><br></div>
</div>