================
@@ -0,0 +1,24 @@
+// REQUIRES: asserts
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %clang_cc1 -fsyntax-only -std=c++20 %s \
+// RUN: --ssaf-extract-summaries=PointerFlow \
+// RUN: --ssaf-tu-summary-file=%t/tu.summary.json \
+// RUN: --ssaf-compilation-unit-id="tu-1" \
+// RUN: -mllvm -debug-only=ssaf-analyses 2>&1 | FileCheck %s
+
+// The two `Holder<decltype([]{})>` instantiations have distinct types but
+// produce colliding USRs for `reset`. The extractor must keep one summary and
+// drop the other with a diagnostic, instead of crashing.
+
+// CHECK: dropping duplicate PointerFlow summary
+
+template <class T>
+struct Holder {
+ T *p;
+ void reset(T *x) { p = x; }
+};
----------------
ziqingluo-90 wrote:
I proposed a fix here: https://github.com/llvm/llvm-project/pull/205430
https://github.com/llvm/llvm-project/pull/204482
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits