[PATCH] D135495: [clang-tidy] handle exceptions properly `ExceptionAnalyzer`

Domján Dániel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 21 10:43:21 PST 2023


isuckatcs added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:66
+                                       CXXBasePath &) {
+        if (BS->getType()->getAsCXXRecordDecl() == BaseClass &&
+            BS->getAccessSpecifier() == AS_public) {
----------------
xazax.hun wrote:
> Will this work with typedefs and other sugar or do you need to get the canonical type here? I do not see test coverage for that scenario.
In this specific case it will work because `getAsCXXRecordDecl()` comes from the `CanProxyBase` utility class, which already canonicalizes the type, but I agree that it's not intuitive and unreadable. 

I also modified the current test cases to have aliases.


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

https://reviews.llvm.org/D135495



More information about the cfe-commits mailing list