NoQ added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:839
+      SVal V = Call.getArgSVal(I);
+      if (V.getAsSymbol() == Sym)
+        return emitNote(N);
----------------
Actually you know what, I'm curious about some IRL data on this.

With uninitialized variable warnings this whole thing worked out really well 
because there are very few reasons to pass a pointer to an uninitialized local 
variable into a function, other than to initialize it. There's a lot more 
reasons to pass allocated memory into a function than to free it though. So I'm 
curious whether this is going to emit unnecessary notes in such cases and we'll 
have to tighten this heuristic.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105819/new/

https://reviews.llvm.org/D105819

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to