Eugene.Zelenko added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:491
     if (const auto *ThrownExpr = Throw->getSubExpr()) {
-      const auto *ThrownType =
-          ThrownExpr->getType()->getUnqualifiedDesugaredType();
-      if (ThrownType->isReferenceType())
-        ThrownType = ThrownType->castAs<ReferenceType>()
-                         ->getPointeeType()
-                         ->getUnqualifiedDesugaredType();
-      Results.registerException(
-          ThrownExpr->getType()->getUnqualifiedDesugaredType());
+      const auto *ThrownType = ThrownExpr->getType()
+                                   .getCanonicalType()
----------------
Please don't use `auto` unless type is explicitly stated in same statement or 
iterator.


================
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:514
       } else {
-        const auto *CaughtType =
-            Catch->getCaughtType()->getUnqualifiedDesugaredType();
-        if (CaughtType->isReferenceType()) {
-          CaughtType = CaughtType->castAs<ReferenceType>()
-                           ->getPointeeType()
-                           ->getUnqualifiedDesugaredType();
-        }
-
+        const auto *CaughtType = Catch->getCaughtType()
+                                     .getCanonicalType()
----------------
Ditto.


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:211
 
+- Improved :doc:`bugprone-exception-escape
+  <clang-tidy/checks/bugprone/exception-escape>` by excluding explicitly
----------------
Please keep alphabetical order (by check name) in this section.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145865

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to