================
@@ -1771,7 +1771,14 @@ void testMallocIntoMalloc(void) {
   StructWithPtr *s = malloc(sizeof(StructWithPtr));
   s->memP = malloc(sizeof(int));
   free(s);
-} // FIXME: should warn here
----------------
NagyDonat wrote:

But the analyzer _must not_ warn if the last line of this function was `return 
s;` instead of `free(s)`. If I understand correctly, your patch introduces a 
false positive in that case.

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

Reply via email to