llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Shafik Yaghmour (shafik)

<details>
<summary>Changes</summary>

Static analysis flagged BuildLockset as not following the Rule of Three, so I 
just added deleted copy ctor and copy assignment.

---
Full diff: https://github.com/llvm/llvm-project/pull/172908.diff


1 Files Affected:

- (modified) clang/lib/Analysis/ThreadSafety.cpp (+2) 


``````````diff
diff --git a/clang/lib/Analysis/ThreadSafety.cpp 
b/clang/lib/Analysis/ThreadSafety.cpp
index c8d61534d0441..60d9c0f3b0ed2 100644
--- a/clang/lib/Analysis/ThreadSafety.cpp
+++ b/clang/lib/Analysis/ThreadSafety.cpp
@@ -1771,6 +1771,8 @@ class BuildLockset : public 
ConstStmtVisitor<BuildLockset> {
   }
 
   ~BuildLockset() { Analyzer->SxBuilder.setLookupLocalVarExpr(nullptr); }
+  BuildLockset(const BuildLockset &) = delete;
+  BuildLockset &operator=(const BuildLockset &) = delete;
 
   void VisitUnaryOperator(const UnaryOperator *UO);
   void VisitBinaryOperator(const BinaryOperator *BO);

``````````

</details>


https://github.com/llvm/llvm-project/pull/172908
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to