This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Fix crash in modernize-use-noexcept on uninstantiated throw class
ClosedPublic

Authored by zinovy.nis on Sep 14 2020, 12:37 PM.

Diff Detail

Event Timeline

zinovy.nis created this revision.Sep 14 2020, 12:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 14 2020, 12:37 PM
zinovy.nis requested review of this revision.Sep 14 2020, 12:37 PM

Please fix the clang-format fail too.

clang-tools-extra/test/clang-tidy/checkers/modernize-use-noexcept-opt.cpp
24

This line is causing tests to fail

aaron.ballman added inline comments.Sep 15 2020, 5:12 AM
clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.cpp
81

No need for the clang:: bit.

clang-tools-extra/test/clang-tidy/checkers/modernize-use-noexcept-opt.cpp
24

Another suggestion is to do: using size_t = decltype(sizeof(0)); at the top of the file.

zinovy.nis marked 2 inline comments as done.
  • Fixed the test.
  • Fixed clang-format issues.
zinovy.nis marked an inline comment as done.Sep 15 2020, 10:56 AM

Done.

This revision is now accepted and ready to land.Sep 15 2020, 11:59 AM