================
@@ -272,9 +272,9 @@ class RawPtrRefLocalVarsChecker
       }
 
       bool TraverseClassTemplateDecl(ClassTemplateDecl *Decl) override {
-        if (isSmartPtrClass(safeGetName(Decl)))
-          return true;
-        return DynamicRecursiveASTVisitor::TraverseClassTemplateDecl(Decl);
+        // We don't traverse primary templates because we only care about
+        // specializations (instantiations).
+        return true;
       }
----------------
rniwa wrote:

So I tried that and added `return true` in other checker's 
`TraverseClassTemplateDecl` but we still hit this assertion in a bunch of other 
places while trying to build WebKit. As far as I can tell, these static 
analyzers stumble upon dependent context in various different ways right now. 
It's possible we can fix that but it's probably a much bigger project than 
adding `return true` in a couple of places where we traverse a template 
declaration.

https://github.com/llvm/llvm-project/pull/182129
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to