================
@@ -34,13 +43,26 @@ template <typename T> bool MapASTVisitor::mapDecl(const T
*D) {
// If there is an error generating a USR for the decl, skip this decl.
if (index::generateUSRForDecl(D, USR))
return true;
+
+ // Prevent Visiting USR twice
+ {
+ std::lock_guard<llvm::sys::Mutex> Guard(USRVisitedGuard);
+ std::string Visited = USR.str().str();
----------------
ilovepi wrote:
I'm not sure I understand the logic here. We're using `SmallString<128>` above,
but now you're memoizing a copy of the USR string contents in a Set, using an
`std::string`. Is there a reason we need 2 string types?
https://github.com/llvm/llvm-project/pull/96809
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits