[PATCH] D135495: [clang-tidy] handle pointers in `ExceptionAnalyzer`

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 8 05:29:24 PDT 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:81
+           isBaseOf(TPointeeUQTy, BPointeeUQTy)) &&
+          (TCVR == 0 || (BCVR ^ TCVR) == 0 || (BCVR & TCVR) > BCVR)) {
+        TypesToDelete.push_back(T);
----------------
This harms readability and it doesn't cover extended qualifiers. I believe Qualifiers::isStrictSuperSet would be a better candidate to use here.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape.cpp:105
+void throw_catch_pointer_c() noexcept {
+  // CHECK-MESSAGES-NOT: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'throw_catch_pointer_c' which should not throw exceptions
+  try {
----------------
These check not lines are useless and should be removed, same goes below.


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

https://reviews.llvm.org/D135495



More information about the cfe-commits mailing list