================
@@ -2606,6 +2606,19 @@ class UnsafeBufferUsageReporter : public 
UnsafeBufferUsageHandler {
 #endif
   }
 
+  void handleUnsafeUniquePtrArrayAccess(const DynTypedNode &Node,
+                                        bool IsRelatedToDecl,
+                                        ASTContext &Ctx) override {
+    SourceLocation Loc;
+    std::string Message;
+
+    Loc = Node.get<Stmt>()->getBeginLoc();
+    Message = "Direct operator[] access on std::unique_ptr<T[]> is unsafe "
----------------
jkorous-apple wrote:

This message doesn't look that much different from what we put for 
`warn_unsafe_buffer_usage_unique_ptr_array_access` in 
`clang/include/clang/Basic/DiagnosticSemaKinds.td`.
Maybe we could keep just one of them?

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

Reply via email to