[clang-tidy] fix PR37913, templated exception factory diagnosed correctly

Summary:
PR37913 documents wrong behaviour for a templated exception factory function.
The check does misidentify dependent types as not derived from std::exception.

The fix to this problem is to ignore dependent types, the analysis works correctly
on the instantiated function.

Reviewers: aaron.ballman, alexfh, hokein, ilya-biryukov

Reviewed By: alexfh

Subscribers: lebedev.ri, nemanjai, mgorny, kbarton, xazax.hun, cfe-commits

Differential Revision: https://reviews.llvm.org/D48714

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@342393 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed