[clang] [alpha.webkit.MemoryUnsafeCastChecker] Don't emit a warning for const_cast (PR #231833)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 03:47:29 PDT 2026
================
@@ -105,6 +105,16 @@ using BoundNodesMap = ::clang::ast_matchers::internal::BoundNodesMap;
// Matches the plain `id` type.
AST_MATCHER(QualType, isObjCIdType) { return Node->isObjCIdType(); }
+// Like equalsBoundNode, but compares canonical declarations so that different
+// redeclarations of the same class (e.g. a forward declaration and the
+// definition) are treated as the same declaration.
+AST_MATCHER_P(Decl, isSameDeclAsBoundNode, std::string, ID) {
----------------
steakhal wrote:
I'd suggest a more specific name, something like `hasSameCanonicalDeclAsBoundNode`
https://github.com/llvm/llvm-project/pull/231833
More information about the cfe-commits
mailing list