[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 22 08:01:43 PDT 2020


njames93 added a comment.

Figured out the actual cause of this bug, `getExceptionSpecRange()` returns a null range if the function has an unknown return type

  undefined_type throws() throw();

This is the tidy output (where assertions are disabled)

  warning: dynamic exception specification '' is deprecated; consider using 'noexcept' instead [modernize-use-noexcept]
  /home/ce/example.cpp:1:1: error: unknown type name 'undefined_type' [clang-diagnostic-error]
  undefined_type throws() throw();
  ^
  1 warning and 1 error generated.
  Error while processing /home/ce/example.cpp.
  Found compiler error(s).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80371/new/

https://reviews.llvm.org/D80371





More information about the cfe-commits mailing list