[clang-tidy] fix PR37913, templated exception factory diagnosed correctly
authorJonas Toth <jonas.toth@gmail.com>
Mon, 17 Sep 2018 13:55:10 +0000 (13:55 +0000)
committerJonas Toth <jonas.toth@gmail.com>
Mon, 17 Sep 2018 13:55:10 +0000 (13:55 +0000)
commitb1efe51dd976381f0fdeed265c3c846922709bc7
tree3e88bfa0e65eb8b0ec6f8df72e3b863e1d5a2cc1
parent76d25d7f553dd49fe9696749383399200b07f7d5
[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

llvm-svn: 342393
clang-tools-extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
clang-tools-extra/test/clang-tidy/hicpp-exception-baseclass.cpp