================
@@ -12,10 +12,21 @@
#include "clang/AST/Expr.h"
#include "clang/ScalableStaticAnalysis/Core/Model/EntityId.h"
#include <set>
+#include <vector>
namespace clang::ssaf {
class TUSummaryExtractor;
+// Intermediate data structure that can be converted to a `EntityPointerLevel`,
+// which abstracts away all the additional information carried in the
NamedDecl.
+struct DeclPointerLevel {
+ const NamedDecl *Decl;
+ unsigned PointerLevel;
+ bool IsReturn;
+};
+
+using DeclPointerLevels = std::vector<DeclPointerLevel>;
----------------
steakhal wrote:
From how I understand, this is upper bounded by the type of the decl (the
number of indirections).
Is it reasonable to expect a low number of indirections? Like 1 or 2 for most
cases? I figure, if this is true, we should use an llvm::SmallVector of 1 or 2
-- to avoid going to the heap every single time.
We could also suffix this alias with `Vec` -- mostly to contrast it with the
similar `EntityPointerLevelSet` because they have a different semantic.
https://github.com/llvm/llvm-project/pull/218196
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits