[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 22:11:19 PDT 2017


NoQ added a comment.

Yay, now that's a lot cleaner!

Regarding style, recently we tend to ask for updating the style in the new code, and i don't think the Golden Rule (http://llvm.org/docs/CodingStandards.html#introduction) does much in our case, but i don't have a strong opinion on that. Maybe we could make a checker to make sure all SValBuilder references are called, say, `SVB`, and all `SVal` instances have names ending with `Val`, and have ourselves fix all the issues reported :) But because the analyzer is done by very few people, i don't think this would happen soon, but having the new code stylish is kind of nice anyway.

However, the null-check for the argument expression is also a performance issue (the compiler would never guess it's always non-null), so i believe it should definitely be removed.


Repository:
  rL LLVM

https://reviews.llvm.org/D30771





More information about the cfe-commits mailing list