[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 13 12:08:55 PDT 2024


================
@@ -22,8 +21,15 @@ class FunctionParmMutationAnalyzer;
 /// a given statement.
 class ExprMutationAnalyzer {
 public:
+  friend class FunctionParmMutationAnalyzer;
+  struct Cache {
+    llvm::DenseMap<const FunctionDecl *,
----------------
PiotrZSL wrote:

Note: consider using llvm::SmallDenseMap, to reduce amount of memory allocations.

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


More information about the cfe-commits mailing list