Need to use function "getAsCXXRecordDecl" of ASTMatchFinder.cpp in a clang-tidy check

Cong Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 9 09:03:30 PST 2016


Hi Richard,

I need to use the function (line 747 of ASTMatchFinder.cpp
<http://clang.llvm.org/doxygen/ASTMatchFinder_8cpp_source.html>):

  static CXXRecordDecl *getAsCXXRecordDecl(const Type *TypeNode)

in the misc-virtual-near-miss check of clang-tidy, because it can correctly
get the declaration of a template type, while QualType::getAsCXXRecordDecl
cannot.

But this function is not accessible in clang-tidy check. I think we should
make this function public accessible since its useful. Could you please
tell me how to do it? Thanks a lot.

Best regards,
Cong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160209/567756a9/attachment.html>


More information about the cfe-commits mailing list