0

I'm writing an open-source misra-c rule checker using the clang-frontend libraries.
Is there a way to get the type of a node(FieldDecl,RecordDecl,FunctionDecl,...) that I've matched with a namedDecl() matcher?

Farzad Sadeghi
  • 105
  • 2
  • 10
  • Depending on your type you should probably use [getTypeForDecl](http://clang.llvm.org/doxygen/classclang_1_1TypeDecl.html#a84a2dafb93379e1b892012e92193d3a7) or [getType](http://clang.llvm.org/doxygen/classclang_1_1ValueDecl.html#a673ae4e2fab42426820de8df166fef5d) – Marco A. Jan 20 '17 at 16:30
  • those are for types e.g. `int`, `long int`,... . I can't get what kind of node i have matched using those. – Farzad Sadeghi Jan 21 '17 at 12:51

0 Answers0