PiotrZSL added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:160-162 + // FIXME: Two function pointers can differ in 'noexcept', but they still + // should be considered to be same, now this triggers false-positive because + // Type* != Type*. ---------------- isuckatcs wrote: > Are you sure `noexcept` is stored in the type? The test case you modified > `throw_noexcept_catch_regular()` tests this scenario and in that case the > types seem to be the same even though one of the is noexcept an the other is > not. > > If the FIXME is valid the proper way would be to implement it in this patch. Yes I'm sure. C++11 - no warning C++14 - no warning C++17 - warning Looks like since C++17 noexcept is part of type. Initially I wanted only to enable tests under C++17/20. That's why "FIXME". I will look into this. ================ Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape.cpp:414 throw &foo; - } catch(int (*)()) { + } catch(int (*)() noexcept) { } ---------------- isuckatcs wrote: > The name of the function suggests that we throw a noexcept function pointer > and catch a non-noexcept one. Please don't change it. Ack. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits