[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    [cfe-dev] DynTypedNode::get() cant infer template argument 'T'
From:       Farzad Sadeghi via cfe-dev <cfe-dev () lists ! llvm ! org>
Date:       2016-11-30 12:41:57
Message-ID: CALFxneX+SzxBsR9QUk5Qmt5h_g2YNZEPCL80JwnE+CfH_evnBQ () mail ! gmail ! com
[Download RAW message or body]

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 {
           ^
what am i doing wrong?


-- 
Farzad Sadeghi
_______________________________________________
cfe-dev mailing list
cfe-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic