i have this code snippet:
ASTContext::DynTypedNodeList NodeList = ASTC->getParents(*DRE); ast_type_traits::DynTypedNode ParentNode = NodeList[0]; /*some code here to determine if the NodeKind is ImplicitCastExpr*/ const ImplicitCastExpr* ParentICE = ParentNode.get();
basically, its getting the parent of a match-node and then if its an ImplicitCastExpr()
, i want to get the node as one and do some further checks. when i try to compile the code, for DynTypedNode::get()
, i get this:
mutator-lvl0.cpp:1644:30: error: no matching member function for call to 'get' ParentICE = ParentNode.get(); ~~~~~~~~~~~^~~ /home/bloodstalker/llvm/llvm/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h:233:12: note: candidate template ignored: couldn't infer template argument 'T' const T *get() const {
here's the declaration from the header:
template <typename T> const T *get() const { return BaseConverter<T>::get(NodeKind, Storage.buffer); }
what am i doing wrong?
Aucun commentaire:
Enregistrer un commentaire