baloghadamsoftware added a comment.

I like this change. If we can retrieve something with a simple getter, then do 
not carry extra parameters all over the code. However, if we have to 
recalculate something over and over again then it is much better to determine 
it once and pass it around as a parameter. Especially in this case where we 
have the information statically at top level and do not have to calculate it 
all if we use that.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1860
+  // that.
+  assert(!RsBase || (RsBase && RsBase->getAllocationFamily() == Family));
+
----------------
Please add an `&& "<Error message>"` to the assertion.


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

https://reviews.llvm.org/D68162



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

Reply via email to