0

How can I know that clang::NamedDecl contains identifier of function?
I have pointer on clang::NamedDecl.

1 Answer 1

1

You can use isa or dyn_cast, e.g.

if (FunctionDecl *F = dyn_cast<FunctionDecl>(myNamedDecl)) {
    // use F
}
3
  • Using that method i have some nodes which correspond your condition for one function. Why this happened? Because dyn_cast triggered also on ValueDecl and DeclaratorDecl? Nov 21, 2015 at 11:18
  • @spiridoncha I don't understand your question. Nov 21, 2015 at 14:26
  • I just don't know how to speak well in English. But I had already decided my problem. Thank you for the answer. Nov 21, 2015 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.