[clang] Fix a crash introduced by 3d5e9ab by adding a nullptr check. (PR #90301)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 28 00:06:36 PDT 2024
================
@@ -54,7 +54,7 @@ class UncountedCallArgsChecker
bool shouldVisitImplicitCode() const { return false; }
bool TraverseDecl(Decl *D) {
- if (isa<ClassTemplateDecl>(D) && isRefType(safeGetName(D)))
+ if (D && isa<ClassTemplateDecl>(D) && isRefType(safeGetName(D)))
----------------
steakhal wrote:
Have you considered using "isa_and_nonull"?
https://github.com/llvm/llvm-project/pull/90301
More information about the cfe-commits
mailing list