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

2016-02-10 Thread Cong Liu via cfe-commits
Hi Richard, You are right. Actually I just need to consider the cases that there are full instantiations of the primary template. I have changed the strategy and not use that function. Thanks a lot! Cong On Wed, Feb 10, 2016 at 2:17 AM, Richard Smith wrote: > On Tue,

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

2016-02-09 Thread Richard Smith via cfe-commits
On Tue, Feb 9, 2016 at 9:03 AM, Cong Liu via cfe-commits wrote: > Hi Richard, > > I need to use the function (line 747 of ASTMatchFinder.cpp): > > static CXXRecordDecl *getAsCXXRecordDecl(const Type *TypeNode) > > in the misc-virtual-near-miss check of clang-tidy,

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

2016-02-09 Thread Cong Liu via cfe-commits
Hi Richard, I need to use the function (line 747 of ASTMatchFinder.cpp ): static CXXRecordDecl *getAsCXXRecordDecl(const Type *TypeNode) in the misc-virtual-near-miss check of clang-tidy, because it can correctly get the

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

2016-02-09 Thread Cong Liu via cfe-commits
Hi Richard, Thank you for your reply. Yes, the case I need to deal with is like what you said: > If you want to make the assumption that the primary template will be > used for an unknown specialization, you'll need something like that > function in ASTMatchFinder. For example, 1.

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

2016-02-09 Thread Richard Smith via cfe-commits
On Tue, Feb 9, 2016 at 4:15 PM, Cong Liu wrote: > Hi Richard, > > Thank you for your reply. Yes, the case I need to deal with is like what you > said: >> >> If you want to make the assumption that the primary template will be >> used for an unknown specialization, you'll need