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

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 02:33:20 PDT 2018


JonasToth created this revision.
JonasToth added reviewers: aaron.ballman, alexfh, hokein, ilya-biryukov.
Herald added subscribers: cfe-commits, xazax.hun.
JonasToth updated this revision to Diff 153280.
JonasToth added a comment.

- remove bad code snippet which was dead


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.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48714

Files:
  clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
  test/clang-tidy/hicpp-exception-baseclass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48714.153280.patch
Type: text/x-patch
Size: 7615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180628/8b355978/attachment-0001.bin>


More information about the cfe-commits mailing list