================
@@ -187,12 +202,12 @@ void test_variadic_constructor_bounds() {
   // The constructor has 1 formal parameter (T* p) plus ellipsis, but we pass 
multiple args
   // This should trigger the bounds checking issue in 
handleSmartPointerConstructorArguments
   int* raw_ptr = new int(42);
-  process_variadic_smart_ptr(VariadicSmartPtr<int>(raw_ptr, 1, 2, 3, 4, 5));
+  process_variadic_smart_ptr(unique_ptr<int>(raw_ptr, 1, 2, 3, 4, 5));
   
   (void)malloc_ptr;
 } // expected-warning {{Potential leak of memory pointed to by 'malloc_ptr'}} 
expected-note {{Potential leak of memory pointed to by 'malloc_ptr'}}
----------------
NagyDonat wrote:

```suggestion
} // expected-warning {{Potential leak of memory pointed to by 'malloc_ptr'}}
  // expected-note@-1 {{Potential leak of memory pointed to by 'malloc_ptr'}}
```
It is possible to move an `expected-` markers onto a different line (by adding 
`@` + relative line number) and it may be a nice touch on long lines like this.

https://github.com/llvm/llvm-project/pull/152751
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to