[llvm-branch-commits] [clang] [SSAF][Analyses] Add an AST visitor for the contribution model (PR #191933)

Balázs Benics via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Apr 21 01:49:28 PDT 2026


================
@@ -0,0 +1,109 @@
+//===- SSAFAnalysesCommon.cpp ---------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "SSAFAnalysesCommon.h"
+
+using namespace clang;
+
+namespace {
+// Traverses the AST and finds contributors.
+class ContributorFinder : public DynamicRecursiveASTVisitor {
+public:
+  std::vector<const NamedDecl *> Contributors;
----------------
steakhal wrote:

I was thinking if this one should be a `set` instead - in case we visit the same decl multiple times.
Or we might as well have multiple declarations, so we would need to pass the canonical decl only. IDK.

https://github.com/llvm/llvm-project/pull/191933


More information about the llvm-branch-commits mailing list